]> www.infradead.org Git - users/jedix/linux-maple.git/commit
NVMe: Fix removal in case of active namespace list scanning method
authorSunad Bhandary <sunad.s@samsung.com>
Fri, 27 May 2016 10:29:43 +0000 (15:59 +0530)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 1 Jun 2017 20:41:31 +0000 (13:41 -0700)
commit958d65f5b6390b5dea101c06a925fd0ef02ee34b
tree37563aff7eabbbe67752cf61c7370b992f106f4f
parent0c18453858b16be9e0d7510fa804c435b7730b3f
NVMe: Fix removal in case of active namespace list scanning method

In case of the active namespace list scanning method, a namespace that
is detached is not removed from the host if it was the last entry in
the list. Fix this by adding a scan to validate namespaces greater than
the value of prev.

This also handles the case of removing namespaces whose value exceed
the device's reported number of namespaces.

Signed-off-by: Sunad Bhandary S <sunad.s@samsung.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
(cherry picked from commit 47b0e50ac724d97c392f771bb46f11d9d1575242)

Orabug: 25130845

Signed-off-by: Ashok Vairavan <ashok.vairavan@oracle.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/nvme/host/core.c