The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] vfs: add missing unlock in sget()
@ 2009-02-10  9:32 Li Zefan
  0 siblings, 0 replies; only message in thread
From: Li Zefan @ 2009-02-10  9:32 UTC (permalink / raw)
  To: Al Viro; +Cc: Peter Zijlstra, Andrew Morton, Paul Menage, LKML

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>
---
 fs/super.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/fs/super.c b/fs/super.c
index 61dce00..f849485 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -356,8 +356,10 @@ retry:
 				continue;
 			if (!grab_super(old))
 				goto retry;
-			if (s)
+			if (s) {
+				up_write(&s->s_umount);
 				destroy_super(s);
+			}
 			return old;
 		}
 	}
@@ -372,6 +374,7 @@ retry:
 	err = set(s, data);
 	if (err) {
 		spin_unlock(&sb_lock);
+		up_write(&s->s_umount);
 		destroy_super(s);
 		return ERR_PTR(err);
 	}
-- 
1.5.4.rc3


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-02-10  9:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-10  9:32 [PATCH] vfs: add missing unlock in sget() Li Zefan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox