summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2009-03-12 14:31:29 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-03-12 16:20:23 -0700
commita3cfbb53b1764a3d1f58ddc032737ab9edaa7d41 (patch)
tree818ca39043749382a4b91d0310f532bf2fdc22ce
parente5bc49ba7439b9726006d031d440cba96819f0f8 (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 <lizf@cn.fujitsu.com> Cc: Al Viro <viro@ZenIV.linux.org.uk> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Menage <menage@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--fs/super.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/super.c b/fs/super.c
index 8349ed6b141..6ce501447ad 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);
}