mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 04:12:04 -04:00
nvme: release namespace head reference on error
commit ac262508daa88fb12c5dc53cf30bde163f9f26c9 upstream. If a namespace identification does not match the subsystem's head for that NSID, release the reference that was taken when the matching head was initially found. Signed-off-by: Keith Busch <kbusch@kernel.org> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
eb565f052b
commit
4e2156c0d3
1 changed files with 1 additions and 0 deletions
|
|
@ -3467,6 +3467,7 @@ static int nvme_init_ns_head(struct nvme_ns *ns, unsigned nsid,
|
|||
"IDs don't match for shared namespace %d\n",
|
||||
nsid);
|
||||
ret = -EINVAL;
|
||||
nvme_put_ns_head(head);
|
||||
goto out_unlock;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue