diff options
| author | Li Zefan <[email protected]> | 2009-03-12 14:31:29 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2009-03-12 16:20:23 -0700 |
| commit | a3cfbb53b1764a3d1f58ddc032737ab9edaa7d41 (patch) | |
| tree | 818ca39043749382a4b91d0310f532bf2fdc22ce | |
| parent | e5bc49ba7439b9726006d031d440cba96819f0f8 (diff) | |
vfs: add missing unlock in sget()
In sget(), destroy_super(s) is called with s->s_umount held, which makes
lockdep unhappy.
Signed-off-by: Li Zefan <[email protected]>
Cc: Al Viro <[email protected]>
Acked-by: Peter Zijlstra <[email protected]>
Cc: Paul Menage <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
| -rw-r--r-- | fs/super.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/super.c b/fs/super.c index 8349ed6b1412..6ce501447ada 100644 --- a/fs/super.c +++ b/fs/super.c @@ -371,8 +371,10 @@ retry: continue; if (!grab_super(old)) goto retry; - if (s) + if (s) { + up_write(&s->s_umount); destroy_super(s); + } return old; } } @@ -387,6 +389,7 @@ retry: err = set(s, data); if (err) { spin_unlock(&sb_lock); + up_write(&s->s_umount); destroy_super(s); return ERR_PTR(err); } |