nvme: lift the check for an unallocated namespace into nvme_identify_ns
authorChristoph Hellwig <hch@lst.de>
Mon, 28 Sep 2020 10:33:19 +0000 (12:33 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 7 Oct 2020 05:56:18 +0000 (07:56 +0200)
commitb8b8cd013327327e757529a0725a8c754c7890e3
tree35ff1c4c04b746dcd2e36c9d6475f27ff1aab633
parent81382f1730d24a60e2b0499592e64e6e640b1871
nvme: lift the check for an unallocated namespace into nvme_identify_ns

Move the check from the two callers into the common helper.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
drivers/nvme/host/core.c