diff options
author | Hannes Reinecke <hare@suse.de> | 2021-07-16 13:30:35 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2021-07-21 09:55:40 +0200 |
commit | 5396fdac56d87d04e75e5068c0c92d33625f51e7 (patch) | |
tree | e408a4a51c5cb8346153afededaf514483374a46 /arch/.gitignore | |
parent | 7764656b108cd308c39e9a8554353b8f9ca232a3 (diff) |
nvme: fix refcounting imbalance when all paths are down
When the last path to a ns_head drops the current code
removes the ns_head from the subsystem list, but will only
delete the disk itself if the last reference to the ns_head
drops. This is causing an refcounting imbalance eg when
applications have a reference to the disk, as then they'll
never get notified that the disk is in fact dead.
This patch moves the call 'del_gendisk' into nvme_mpath_check_last_path(),
ensuring that the disk can be properly removed and applications get the
appropriate notifications.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'arch/.gitignore')
0 files changed, 0 insertions, 0 deletions