提交 897c6ff9 编写于 作者: A Arjan van de Ven 提交者: Linus Torvalds

[PATCH] lockdep: annotate sb ->s_umount

The s_umount rwsem needs to be classified as per-superblock since it's
perfectly legit to keep multiple of those recursively in the VFS locking
rules.

Has no effect on non-lockdep kernels.
Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 cf516249
...@@ -72,6 +72,7 @@ static struct super_block *alloc_super(struct file_system_type *type) ...@@ -72,6 +72,7 @@ static struct super_block *alloc_super(struct file_system_type *type)
INIT_LIST_HEAD(&s->s_inodes); INIT_LIST_HEAD(&s->s_inodes);
init_rwsem(&s->s_umount); init_rwsem(&s->s_umount);
mutex_init(&s->s_lock); mutex_init(&s->s_lock);
lockdep_set_class(&s->s_umount, &type->s_umount_key);
/* /*
* The locking rules for s_lock are up to the * The locking rules for s_lock are up to the
* filesystem. For example ext3fs has different * filesystem. For example ext3fs has different
......
...@@ -1296,6 +1296,7 @@ struct file_system_type { ...@@ -1296,6 +1296,7 @@ struct file_system_type {
struct file_system_type * next; struct file_system_type * next;
struct list_head fs_supers; struct list_head fs_supers;
struct lock_class_key s_lock_key; struct lock_class_key s_lock_key;
struct lock_class_key s_umount_key;
}; };
extern int get_sb_bdev(struct file_system_type *fs_type, extern int get_sb_bdev(struct file_system_type *fs_type,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册