Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 131497
b: refs/heads/master
c: ada723d
h: refs/heads/master
i:
  131495: 0b62e61
v: v3
  • Loading branch information
Peter Zijlstra authored and Linus Torvalds committed Feb 18, 2009
1 parent 765fedf commit 0d10c0f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 27c0c8e511fa9e2389503926840fac606d90a049
refs/heads/master: ada723dcd681e2dffd7d73345cc8fda0eb0df9bd
17 changes: 16 additions & 1 deletion trunk/fs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0d10c0f

Please sign in to comment.