From: Li Zefan <lizf@cn.fujitsu.com>
To: Peter Zijlstra <peterz@infradead.org>, Al Viro <viro@ZenIV.linux.org.uk>
Cc: LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Paul Menage <menage@google.com>,
Arjan van de Ven <arjan@infradead.org>,
linux-fsdevel@vger.kernel.org
Subject: Re: [cgroup or VFS ?] INFO: possible recursive locking detected
Date: Tue, 10 Feb 2009 11:06:39 +0800 [thread overview]
Message-ID: <4990EF3F.3010501@cn.fujitsu.com> (raw)
In-Reply-To: <1234180131.5951.85.camel@laptop>
> It seems to me we can simply put the new s_umount instance in a
> different subclass. Its a bit unusual to use _nested for the outer lock,
> but lockdep doesn't particularly cares about subclass order.
>
> If there's any issue with the callers of sget() assuming the s_umount
> lock being of sublcass 0, then there is another annotation we can use to
> fix that, but lets not bother with that if this is sufficient.
>
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Tested-by: Li Zefan <lizf@cn.fujitsu.com>
Thanks!
a minor comment
> + * lock of the old one. Since these are clearly distrinct
s/distrinct/distinct
BTW, I found another bug in current code:
From: Li Zefan <lizf@cn.fujitsu.com>
Date: Tue, 10 Feb 2009 10:55:53 +0800
Subject: [PATCH] vfs: add missing unlock in sget()
We should release s->s_umount before calling destroy_super(s).
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
fs/super.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/fs/super.c b/fs/super.c
index 61dce00..8bdf981 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;
}
}
--
1.5.4.rc3
next prev parent reply other threads:[~2009-02-10 3:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-05 3:23 [cgroup or VFS ?] INFO: possible recursive locking detected Li Zefan
2009-01-08 3:45 ` Li Zefan
2009-02-09 11:23 ` Al Viro
2009-02-09 11:38 ` Li Zefan
2009-02-09 11:48 ` Peter Zijlstra
2009-02-10 3:06 ` Li Zefan [this message]
2009-02-10 4:37 ` Al Viro
2009-02-10 5:19 ` Li Zefan
2009-02-10 6:07 ` Al Viro
2009-02-10 9:25 ` Li Zefan
2009-02-12 6:14 ` Li Zefan
2009-02-10 8:32 ` Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4990EF3F.3010501@cn.fujitsu.com \
--to=lizf@cn.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=arjan@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=menage@google.com \
--cc=peterz@infradead.org \
--cc=viro@ZenIV.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox