linux/include
Nilay Shroff fe66286086 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 <hch@lst.de>
Signed-off-by: Nilay Shroff <nilay@linux.ibm.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Link: https://lore.kernel.org/r/20250128143436.874357-2-nilay@linux.ibm.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2025-01-29 07:16:47 -07:00
..
acpi ACPI: bus: implement acpi_device_hid when !ACPI 2024-12-19 20:59:36 +01:00
asm-generic fprobe: Add fprobe_header encoding feature 2024-12-26 10:50:05 -05:00
clocksource x86/hyperv: Fix hv tsc page based sched_clock for hibernation 2024-12-09 18:42:42 +00:00
crypto
cxl
drm drm/bridge: fix documentation for the hdmi_audio_prepare() callback 2025-01-15 12:32:47 +02:00
dt-bindings Merge branches 'clk-airoha', 'clk-rockchip', 'clk-stm', 'clk-thead' and 'clk-bcm' into clk-next 2025-01-21 11:22:26 -08:00
keys
kunit linux_kselftest-kunit-6.14-rc1 2025-01-22 12:32:39 -08:00
kvm KVM: arm64: Add unified helper for reprogramming counters by mask 2024-12-18 13:22:25 -08:00
linux block: get rid of request queue ->sysfs_dir_lock 2025-01-29 07:16:47 -07:00
math-emu
media
memory
misc
net Networking changes for 6.14. 2025-01-22 08:28:57 -08:00
pcmcia
ras
rdma
rv
scsi block: simplify tag allocation policy selection 2025-01-06 07:37:41 -07:00
soc A pretty quiet cycle this time around. We have a bunch of new Qualcomm clk 2025-01-22 10:54:18 -08:00
sound regmap: Updates for v6.14 2025-01-22 08:57:52 -08:00
target
trace Networking changes for 6.14. 2025-01-22 08:28:57 -08:00
uapi Networking changes for 6.14. 2025-01-22 08:28:57 -08:00
ufs scsi: ufs: qcom: Power off the PHY if it was already powered on in ufs_qcom_power_up_sequence() 2025-01-02 13:00:16 -05:00
vdso vdso: Correct typo in PAGE_SHIFT comment 2025-01-15 11:07:08 +01:00
video
xen