> 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@xxxxxxxxx> Tested-by: Li Zefan <lizf@xxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxx> --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html