All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch for 2.6.29? 3/3] vfs: add missing unlock in sget()
@ 2009-03-04 20:12 akpm
  2009-03-05  1:58 ` Li Zefan
  0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2009-03-04 20:12 UTC (permalink / raw)
  To: viro; +Cc: linux-fsdevel, akpm, lizf, a.p.zijlstra, menage, viro

From: Li Zefan <lizf@cn.fujitsu.com>

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>
---

 fs/super.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff -puN fs/super.c~vfs-add-missing-unlock-in-sget fs/super.c
--- a/fs/super.c~vfs-add-missing-unlock-in-sget
+++ a/fs/super.c
@@ -357,8 +357,10 @@ retry:
 				continue;
 			if (!grab_super(old))
 				goto retry;
-			if (s)
+			if (s) {
+				up_write(&s->s_umount);
 				destroy_super(s);
+			}
 			return old;
 		}
 	}
@@ -373,6 +375,7 @@ retry:
 	err = set(s, data);
 	if (err) {
 		spin_unlock(&sb_lock);
+		up_write(&s->s_umount);
 		destroy_super(s);
 		return ERR_PTR(err);
 	}
_

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-03-05  1:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-04 20:12 [patch for 2.6.29? 3/3] vfs: add missing unlock in sget() akpm
2009-03-05  1:58 ` Li Zefan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.