[PATCH 09/12] lockdep: add a page lock class per filesystem type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Provide a different page lock class per filesystem, so we can properly
express the neseting relations between filesystems.

Signed-off-by: Peter Zijlstra <[email protected]>
---
 fs/filesystems.c   |    1 +
 include/linux/fs.h |    5 +++++
 2 files changed, 6 insertions(+)

Index: linux-2.6/fs/filesystems.c
===================================================================
--- linux-2.6.orig/fs/filesystems.c
+++ linux-2.6/fs/filesystems.c
@@ -73,6 +73,7 @@ int register_filesystem(struct file_syst
 	if (fs->next)
 		return -EBUSY;
 	INIT_LIST_HEAD(&fs->fs_supers);
+	lockdep_init_map(&fs->s_mapping_map, fs->name, &fs->s_mapping_key, 0);
 	write_lock(&file_systems_lock);
 	p = find_filesystem(fs->name, strlen(fs->name));
 	if (*p)
Index: linux-2.6/include/linux/fs.h
===================================================================
--- linux-2.6.orig/include/linux/fs.h
+++ linux-2.6/include/linux/fs.h
@@ -1302,8 +1302,13 @@ struct file_system_type {
 	struct module *owner;
 	struct file_system_type * next;
 	struct list_head fs_supers;
+
 	struct lock_class_key s_lock_key;
 	struct lock_class_key s_umount_key;
+	struct lock_class_key s_mapping_key;
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
+	struct lockdep_map s_mapping_map;
+#endif
 };
 
 extern int get_sb_bdev(struct file_system_type *fs_type,

--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux