nvme: open code nvme_put_ns_from_disk in nvme_ns_head_ctrl_ioctl
authorChristoph Hellwig <hch@lst.de>
Wed, 19 May 2021 07:08:41 +0000 (09:08 +0200)
committerChristoph Hellwig <hch@lst.de>
Thu, 3 Jun 2021 07:29:25 +0000 (10:29 +0300)
nvme_ns_head_ctrl_ioctl is always used on multipath nodes, so just call
srcu_read_unlock directly.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
drivers/nvme/host/ioctl.c

index 3f84bd3..2c6969f 100644 (file)
@@ -377,7 +377,7 @@ static int nvme_ns_head_ctrl_ioctl(struct nvme_ns *ns, unsigned int cmd,
        int ret;
 
        nvme_get_ctrl(ns->ctrl);
-       nvme_put_ns_from_disk(head, srcu_idx);
+       srcu_read_unlock(&head->srcu, srcu_idx);
        ret = nvme_ctrl_ioctl(ns->ctrl, cmd, argp);
 
        nvme_put_ctrl(ctrl);