nvme-multipath: put module reference when delayed removal work is canceled
PATCH 1/1 nvme-multipath: put module reference when delayed removal work is canceled
The delayed disk removal work is canceled when a NS (re)appears. However, we do not put the module reference grabbed in nvme_mpath_remove_disk(), so fix that.
drivers/nvme/host/core.c +2 -1
@@ -4083,7 +4083,8 @@ static int nvme_init_ns_head(struct nvme_ns *ns, struct nvme_ns_info *info)mutex_unlock (&ctrl->subsys->lock);#ifdef CONFIG_NVME_MULTIPATH -cancel_delayed_work (&head->remove_work); +if (cancel_delayed_work (&head->remove_work)) +module_put (THIS_MODULE );#endif return 0 ;
Signature · 1 line
2.43.5
Quoted 11 lines · John Garry
The delayed disk removal work is canceled when a NS (re)appears. However, we do not put the module reference grabbed in
nvme_mpath_remove_disk(), so fix that.Signed-off-by John Garry <[email protected]>drivers/nvme/host/core.c +0
-0
drivers/nvme/host/core.c static int nvme_init_ns_head(struct nvme_ns *ns, struct nvme_ns_info *info) · line 4090
Quoted 9 lines
drivers/nvme/host/core.c +2
-1@@ -4083,7 +4083,8 @@ static int nvme_init_ns_head(struct nvme_ns *ns, struct nvme_ns_info *info)mutex_unlock (&ctrl->subsys->lock);#ifdef CONFIG_NVME_MULTIPATH -cancel_delayed_work (&head->remove_work); +if (cancel_delayed_work (&head->remove_work)) +module_put (THIS_MODULE );#endif return 0 ;
Looks good to me:
Quoted 5 lines · John Garry
The delayed disk removal work is canceled when a NS (re)appears. However, we do not put the module reference grabbed in
nvme_mpath_remove_disk(), so fix that.Signed-off-by John Garry<[email protected]>
Looks good.
Quoted 3 lines · John Garry
The delayed disk removal work is canceled when a NS (re)appears. However, we do not put the module reference grabbed in
nvme_mpath_remove_disk(), so fix that.
Looks good:
Quoted 3 lines · John Garry
The delayed disk removal work is canceled when a NS (re)appears. However, we do not put the module reference grabbed in
nvme_mpath_remove_disk(), so fix that.
Thanks, applied to nvme-7.1.