* [PATCH] autofs4 - fix lockdep splat in autofs
@ 2011-08-22 3:52 Ian Kent
0 siblings, 0 replies; only message in thread
From: Ian Kent @ 2011-08-22 3:52 UTC (permalink / raw)
To: Al Viro; +Cc: Kernel Mailing List, Steven Rostedt
From: Steven Rostedt <rostedt@goodmis.org>
When recursing down the locks when traversing a tree/list in
get_next_positive_dentry() or get_next_positive_subdir() a lock can
change from being nested to being a parent which breaks lockdep. This
patch tells lockdep about what we did.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Acked-by: Ian Kent <raven@themaw.net>
---
fs/autofs4/expire.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/fs/autofs4/expire.c b/fs/autofs4/expire.c
index 450f529..1feb68e 100644
--- a/fs/autofs4/expire.c
+++ b/fs/autofs4/expire.c
@@ -124,6 +124,7 @@ start:
/* Negative dentry - try next */
if (!simple_positive(q)) {
spin_unlock(&p->d_lock);
+ lock_set_subclass(&q->d_lock.dep_map, 0, _RET_IP_);
p = q;
goto again;
}
@@ -186,6 +187,7 @@ again:
/* Negative dentry - try next */
if (!simple_positive(ret)) {
spin_unlock(&p->d_lock);
+ lock_set_subclass(&ret->d_lock.dep_map, 0, _RET_IP_);
p = ret;
goto again;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-08-22 4:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-22 3:52 [PATCH] autofs4 - fix lockdep splat in autofs Ian Kent
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®