On Wed, Aug 02, 2017@03:51:09PM +0800, Guan Junxiong wrote:
This patch checks the validity of fd returned by open operation on
the nvme divices. For example, when a user who doesn't have the
permission to open the device trys to use nvme list command to list
nvme devices, the fd is returned as -1 and errno indicates permission
denied.
In addition,this patch closes the current open device before
processing the next device.
Signed-off-by: Guan Junxiong <guanjunxiong at huawei.com>
Reviewed-by: Christoph Hellwig <hch at lst.de>
Applied to the repo, thanks for the resend.