diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-02-20 17:40:43 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-20 17:40:43 +0100 |
commit | 3b6f7b9beb553ea71a6d4d76ba82cf32eb6dadd2 (patch) | |
tree | 2cd8a8d61f350aa3b00e6b0afc998544923f183e /fs/super.c | |
parent | 9be1b56a3e718aa998772019c57c398dbb19e258 (diff) | |
parent | 07a66d7c53a538e1a9759954a82bb6c07365eff9 (diff) | |
download | op-kernel-dev-3b6f7b9beb553ea71a6d4d76ba82cf32eb6dadd2.zip op-kernel-dev-3b6f7b9beb553ea71a6d4d76ba82cf32eb6dadd2.tar.gz |
Merge branch 'x86/urgent' into x86/core
Diffstat (limited to 'fs/super.c')
-rw-r--r-- | fs/super.c | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -82,7 +82,22 @@ static struct super_block *alloc_super(struct file_system_type *type) * lock ordering than usbfs: */ lockdep_set_class(&s->s_lock, &type->s_lock_key); - down_write(&s->s_umount); + /* + * sget() can have s_umount recursion. + * + * When it cannot find a suitable sb, it allocates a new + * one (this one), and tries again to find a suitable old + * one. + * + * In case that succeeds, it will acquire the s_umount + * lock of the old one. Since these are clearly distrinct + * locks, and this object isn't exposed yet, there's no + * risk of deadlocks. + * + * Annotate this by putting this lock in a different + * subclass. + */ + down_write_nested(&s->s_umount, SINGLE_DEPTH_NESTING); s->s_count = S_BIAS; atomic_set(&s->s_active, 1); mutex_init(&s->s_vfs_rename_mutex); |