From: Li Zefan Date: Thu, 12 Mar 2009 21:31:29 +0000 (-0700) Subject: vfs: add missing unlock in sget() X-Git-Tag: v3.0~10379 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a3cfbb53b1764a3d1f58ddc032737ab9edaa7d41;p=platform%2Fkernel%2Flinux-amlogic.git 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 Cc: Al Viro Acked-by: Peter Zijlstra Cc: Paul Menage Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/super.c b/fs/super.c index 8349ed6..6ce5014 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); }