Re: [PATCH 2/3] null_blk: give the file-scope mutex a descriptive name
From: Bart Van Assche
Date: Mon Jul 06 2026 - 09:22:29 EST
On 7/6/26 5:35 AM, Zizhi Wo wrote:
The file-scope lock mutex mainly serializes access to the global nullb_list
and related device setup. Rename it to "nullb_list_lock" to make its
purpose clear. No functional change.
From commit a2db328b0839 ("null_blk: fix null-ptr-dereference while
configuring 'power' and 'submit_queues'"):
Writing 'power' and 'submit_queues' concurrently will trigger kernel
panic:
[ ... ]
Fix this problem by resuing the global mutex to protect
nullb_device_power_store() and nullb_update_nr_hw_queues() from configfs.
This makes it clear that the "lock" mutex has a broader purpose than
only protecting nullb_list. Hence, the name nullb_list_lock is
confusing. How about using the name "nullb_lock"?
Thanks,
Bart.