mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 05:04:02 +02:00
nvme: don't reference NS after unlocking in nvme_ns_head_ctrl_ioctl()
In nvme_ns_head_ctrl_ioctl(), once we drop the SRCU read lock we should not reference the NS to lookup the controller, so use the available controller pointer directly. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: John Garry <john.g.garry@oracle.com> Signed-off-by: Keith Busch <kbusch@kernel.org>
This commit is contained in:
parent
627e8bb91a
commit
77c57daf98
|
|
@ -699,7 +699,7 @@ static int nvme_ns_head_ctrl_ioctl(struct nvme_ns *ns, unsigned int cmd,
|
|||
|
||||
nvme_get_ctrl(ns->ctrl);
|
||||
srcu_read_unlock(&head->srcu, srcu_idx);
|
||||
ret = nvme_ctrl_ioctl(ns->ctrl, cmd, argp, open_for_write);
|
||||
ret = nvme_ctrl_ioctl(ctrl, cmd, argp, open_for_write);
|
||||
|
||||
nvme_put_ctrl(ctrl);
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user