aboutsummaryrefslogtreecommitdiff
path: root/drivers/nvme/target/admin-cmd.c
diff options
context:
space:
mode:
authorChaitanya Kulkarni2020-05-19 01:06:27 -0700
committerChristoph Hellwig2020-05-27 07:12:38 +0200
commit463c5fabb8dfca4941c4c50365bb7749ac5c9916 (patch)
tree486190dfe5aae498989c7ec45915db60da99ea06 /drivers/nvme/target/admin-cmd.c
parent696ece751366e7a02a81fa0228125fe25a47969d (diff)
nvmet: add helper to revalidate bdev and file ns
This patch adds a wrapper helper to indicate size change in the bdev & file-backed namespace when revalidating ns. This helper is needed in order to minimize code repetition in the next patch for configfs.c and existing admin-cmd.c.   Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Reviewed-by: Sagi Grimberg <sagi@grimbeg.me> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme/target/admin-cmd.c')
-rw-r--r--drivers/nvme/target/admin-cmd.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c
index 4c79aa804887..f544a14e8b5c 100644
--- a/drivers/nvme/target/admin-cmd.c
+++ b/drivers/nvme/target/admin-cmd.c
@@ -486,10 +486,7 @@ static void nvmet_execute_identify_ns(struct nvmet_req *req)
if (!ns)
goto done;
- if (ns->bdev)
- nvmet_bdev_ns_revalidate(ns);
- else
- nvmet_file_ns_revalidate(ns);
+ nvmet_ns_revalidate(ns);
/*
* nuse = ncap = nsze isn't always true, but we have no way to find