aboutsummaryrefslogtreecommitdiffstats
path: root/fs/super.c
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2009-03-12 17:31:29 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-03-12 19:20:23 -0400
commita3cfbb53b1764a3d1f58ddc032737ab9edaa7d41 (patch)
tree818ca39043749382a4b91d0310f532bf2fdc22ce /fs/super.c
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>
Diffstat (limited to 'fs/super.c')
-rw-r--r--fs/super.c5
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:
371 continue; 371 continue;
372 if (!grab_super(old)) 372 if (!grab_super(old))
373 goto retry; 373 goto retry;
374 if (s) 374 if (s) {
375 up_write(&s->s_umount);
375 destroy_super(s); 376 destroy_super(s);
377 }
376 return old; 378 return old;
377 } 379 }
378 } 380 }
@@ -387,6 +389,7 @@ retry:
387 err = set(s, data); 389 err = set(s, data);
388 if (err) { 390 if (err) {
389 spin_unlock(&sb_lock); 391 spin_unlock(&sb_lock);
392 up_write(&s->s_umount);
390 destroy_super(s); 393 destroy_super(s);
391 return ERR_PTR(err); 394 return ERR_PTR(err);
392 } 395 }