]> git.baikalelectronics.ru Git - kernel.git/commit
nvme: fix srcu locking on error return in nvme_get_ns_from_disk
authorChristoph Hellwig <hch@lst.de>
Fri, 17 May 2019 09:47:33 +0000 (02:47 -0700)
committerKeith Busch <keith.busch@intel.com>
Fri, 17 May 2019 17:06:59 +0000 (11:06 -0600)
commite83806c5ac2a7c7cb0275de54f39af33b0519cb3
treea88268d32b052af56875655effd26ee1b34ba41b
parent58aba8945c2e8df2e12af7af9795e469e5051296
nvme: fix srcu locking on error return in nvme_get_ns_from_disk

If we can't get a namespace don't leak the SRCU lock.  nvme_ioctl was
working around this, but nvme_pr_command wasn't handling this properly.
Just do what callers would usually expect.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
drivers/nvme/host/core.c