Skip to contentSkip to conversation

block: document debugfs_mutex

PATCH Christoph Hellwig 1 participant 1 message May 31, 2022 Block layer

lore
Share & tools
lore
#0 lore raw

Move debugfs_mutex next to the dentries that it protects and document what it is used for.

---
 drivers/scsi/sd.c      | 1 -
 include/linux/blkdev.h | 5 ++++-
 2 files changed, 4 insertions(+), 2 deletions(-)
include/linux/blkdev.h +4 -1
index 095a0d68c9b41..5ddcc7b77de0f 100644
@@ -481,7 +481,6 @@ struct request_queue {
 #endif /* CONFIG_BLK_DEV_ZONED */
 
 	int			node;
-	struct mutex		debugfs_mutex;
 #ifdef CONFIG_BLK_DEV_IO_TRACE
 	struct blk_trace __rcu	*blk_trace;
 #endif
@@ -527,6 +526,10 @@ struct request_queue {
 	struct dentry		*debugfs_dir;
 	struct dentry		*sched_debugfs_dir;
 	struct dentry		*rqos_debugfs_dir;
+	/*
+	 * Serializes all debugfs metadata operations using the above dentries.
+	 */
+	struct mutex		debugfs_mutex;
 
 	bool			mq_sysfs_init_done;
 
Signature · 1 line
2.30.2