From: Li Zefan Date: Thu, 12 Mar 2009 21:31:29 +0000 (-0700) Subject: vfs: add missing unlock in sget() X-Git-Tag: v2.6.29-rc8~16 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=a3cfbb53b1764a3d1f58ddc032737ab9edaa7d41;p=people%2Fssmith%2Fnetchannel2-pvops.bak.git%2F.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 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); }