nvme: forward port sysfs delete fix
PATCH 1/1 nvme: forward port sysfs delete fix
From: Keith Busch <[email protected]>
We had a late fix that modified nvme_sysfs_delete() after the staging branch for the next merge window relocated the function to a new file. Port commit 2eb94dd56a4a4 ("nvme: do not let the user delete a ctrl before a complete") to the latest to avoid a potentially confusing merge conflict.
Cc Maurizio Lombardi <[email protected]>
Cc Max Gurtovoy <[email protected]>
Signed-off-by Keith Busch <[email protected]>
--- drivers/nvme/host/sysfs.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/nvme/host/sysfs.c +3 -0
@@ -202,6 +202,9 @@ static ssize_t nvme_sysfs_delete(struct device *dev, {struct nvme_ctrl *ctrl =dev_get_drvdata (dev); +if (!test_bit (NVME_CTRL_STARTED_ONCE , &ctrl->flags)) +return -EBUSY ; +if (device_remove_file_self (dev, attr))nvme_delete_ctrl_sync (ctrl);return count;
Signature · 1 line
2.34.1
Quoted 7 lines · Keith Busch
From: Keith Busch <[email protected]>
We had a late fix that modified
nvme_sysfs_delete()after the staging branch for the next merge window relocated the function to a new file. Port commit2eb94dd56a4a4("nvme: do not let the user delete a ctrl before a complete") to the latest to avoid a potentially confusing merge conflict.
Looks good:
Reviewed-by Christoph Hellwig <[email protected]>