mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
nvme: rename nvme_mpath_shutdown_disk to nvme_mpath_remove_disk
In the NVMe context, the term "shutdown" has a specific technical meaning. To avoid confusion, this commit renames the nvme_mpath_ shutdown_disk function to nvme_mpath_remove_disk to better reflect its purpose (i.e. removing the disk from the system). However, nvme_mpath_remove_disk was already in use, and its functionality is related to releasing or putting the head node disk. To resolve this naming conflict and improve clarity, the existing nvme_mpath_ remove_disk function is also renamed to nvme_mpath_put_disk. This renaming improves code readability and better aligns function names with their actual roles. Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Nilay Shroff <nilay@linux.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
committed by
Christoph Hellwig
parent
737af5f001
commit
9e221d8cf9
@@ -698,15 +698,15 @@ static void nvme_remove_head_work(struct work_struct *work)
|
||||
{
|
||||
struct nvme_ns_head *head = container_of(to_delayed_work(work),
|
||||
struct nvme_ns_head, remove_work);
|
||||
bool shutdown = false;
|
||||
bool remove = false;
|
||||
|
||||
mutex_lock(&head->subsys->lock);
|
||||
if (list_empty(&head->list)) {
|
||||
list_del_init(&head->entry);
|
||||
shutdown = true;
|
||||
remove = true;
|
||||
}
|
||||
mutex_unlock(&head->subsys->lock);
|
||||
if (shutdown)
|
||||
if (remove)
|
||||
nvme_remove_head(head);
|
||||
|
||||
module_put(THIS_MODULE);
|
||||
@@ -1286,9 +1286,9 @@ void nvme_mpath_add_disk(struct nvme_ns *ns, __le32 anagrpid)
|
||||
#endif
|
||||
}
|
||||
|
||||
void nvme_mpath_shutdown_disk(struct nvme_ns_head *head)
|
||||
void nvme_mpath_remove_disk(struct nvme_ns_head *head)
|
||||
{
|
||||
bool shutdown = false;
|
||||
bool remove = false;
|
||||
|
||||
mutex_lock(&head->subsys->lock);
|
||||
/*
|
||||
@@ -1314,15 +1314,15 @@ void nvme_mpath_shutdown_disk(struct nvme_ns_head *head)
|
||||
head->delayed_removal_secs * HZ);
|
||||
} else {
|
||||
list_del_init(&head->entry);
|
||||
shutdown = true;
|
||||
remove = true;
|
||||
}
|
||||
out:
|
||||
mutex_unlock(&head->subsys->lock);
|
||||
if (shutdown)
|
||||
if (remove)
|
||||
nvme_remove_head(head);
|
||||
}
|
||||
|
||||
void nvme_mpath_remove_disk(struct nvme_ns_head *head)
|
||||
void nvme_mpath_put_disk(struct nvme_ns_head *head)
|
||||
{
|
||||
if (!head->disk)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user