diff options
author | Ming Lei <ming.lei@redhat.com> | 2024-12-18 18:16:14 +0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-12-18 07:25:37 -0700 |
commit | 224749be6c23efe7fb8a030854f4fc5d1dd813b3 (patch) | |
tree | d3d8d94db2d25a9371f7099933ccf53ab266cfb7 /block/blk-sysfs.c | |
parent | 51588b1b77b65cd0fb3440f78f37bef7178a2715 (diff) | |
download | linux-224749be6c23efe7fb8a030854f4fc5d1dd813b3.tar.gz linux-224749be6c23efe7fb8a030854f4fc5d1dd813b3.tar.bz2 linux-224749be6c23efe7fb8a030854f4fc5d1dd813b3.zip |
block: Revert "block: Fix potential deadlock while freezing queue and acquiring sysfs_lock"
This reverts commit be26ba96421ab0a8fa2055ccf7db7832a13c44d2.
Commit be26ba96421a ("block: Fix potential deadlock while freezing queue and
acquiring sysfs_loc") actually reverts commit 22465bbac53c ("blk-mq: move cpuhp
callback registering out of q->sysfs_lock"), and causes the original resctrl
lockdep warning.
So revert it and we need to fix the issue in another way.
Cc: Nilay Shroff <nilay@linux.ibm.com>
Fixes: be26ba96421a ("block: Fix potential deadlock while freezing queue and acquiring sysfs_loc")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20241218101617.3275704-2-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-sysfs.c')
-rw-r--r-- | block/blk-sysfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index 64f70c713d2f..767598e719ab 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c @@ -706,11 +706,11 @@ queue_attr_store(struct kobject *kobj, struct attribute *attr, if (entry->load_module) entry->load_module(disk, page, length); - mutex_lock(&q->sysfs_lock); blk_mq_freeze_queue(q); + mutex_lock(&q->sysfs_lock); res = entry->store(disk, page, length); - blk_mq_unfreeze_queue(q); mutex_unlock(&q->sysfs_lock); + blk_mq_unfreeze_queue(q); return res; } |