]> git.baikalelectronics.ru Git - kernel.git/commit
nvmet: only check for filebacking on -ENOTBLK
authorHannes Reinecke <hare@suse.de>
Wed, 25 Jul 2018 06:34:45 +0000 (08:34 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 25 Jul 2018 11:14:04 +0000 (13:14 +0200)
commit4ff967e04b07a95ce89c3151f80fded2c7e9d2bb
tree4427e017e329c90c63354ed107dae26b17e167d1
parentbd855e368e2a41a8910fd46a4a17d1465c09d08b
nvmet: only check for filebacking on -ENOTBLK

We only need to check for a file-backed namespace if
nvmet_bdev_ns_enable() returns -ENOTBLK. For any other error
it's pointless as the open() error will remain the same.

Fixes: af57dd9c ("nvmet: add simple file backed ns support")
Signed-off-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/target/core.c