aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/gcc-plugins/sancov_plugin.c
diff options
context:
space:
mode:
authorNilay Shroff <[email protected]>2025-01-28 14:34:13 +0000
committerJens Axboe <[email protected]>2025-01-29 14:16:47 +0000
commitfe6628608627424fb4a6d4c8d2235822457c5d9c (patch)
tree0bc1fca6addddcf0753974608cbad396e79ac629 /scripts/gcc-plugins/sancov_plugin.c
parentloop: don't clear LO_FLAGS_PARTSCAN on LOOP_SET_STATUS{,64} (diff)
downloadkernel-fe6628608627424fb4a6d4c8d2235822457c5d9c.tar.gz
kernel-fe6628608627424fb4a6d4c8d2235822457c5d9c.zip
block: get rid of request queue ->sysfs_dir_lock
The request queue uses ->sysfs_dir_lock for protecting the addition/ deletion of kobject entries under sysfs while we register/unregister blk-mq. However kobject addition/deletion is already protected with kernfs/sysfs internal synchronization primitives. So use of q->sysfs_ dir_lock seems redundant. Moreover, q->sysfs_dir_lock is also used at few other callsites along with q->sysfs_lock for protecting the addition/deletion of kojects. One such example is when we register with sysfs a set of independent access ranges for a disk. Here as well we could get rid off q->sysfs_ dir_lock and only use q->sysfs_lock. The only variable which q->sysfs_dir_lock appears to protect is q-> mq_sysfs_init_done which is set/unset while registering/unregistering blk-mq with sysfs. But use of q->mq_sysfs_init_done could be easily replaced using queue registered bit QUEUE_FLAG_REGISTERED. So with this patch we remove q->sysfs_dir_lock from each callsite and replace q->mq_sysfs_init_done using QUEUE_FLAG_REGISTERED. Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Nilay Shroff <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/sancov_plugin.c')
0 files changed, 0 insertions, 0 deletions