Commit 1d6f2097 authored by Steven Rostedt's avatar Steven Rostedt Committed by Al Viro

autofs4 - fix lockdep splat in autofs

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: default avatarSteven Rostedt <rostedt@goodmis.org>
Acked-by: default avatarIan Kent <raven@themaw.net>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent e188dc02
...@@ -124,6 +124,7 @@ static struct dentry *get_next_positive_subdir(struct dentry *prev, ...@@ -124,6 +124,7 @@ static struct dentry *get_next_positive_subdir(struct dentry *prev,
/* Negative dentry - try next */ /* Negative dentry - try next */
if (!simple_positive(q)) { if (!simple_positive(q)) {
spin_unlock(&p->d_lock); spin_unlock(&p->d_lock);
lock_set_subclass(&q->d_lock.dep_map, 0, _RET_IP_);
p = q; p = q;
goto again; goto again;
} }
...@@ -186,6 +187,7 @@ static struct dentry *get_next_positive_dentry(struct dentry *prev, ...@@ -186,6 +187,7 @@ static struct dentry *get_next_positive_dentry(struct dentry *prev,
/* Negative dentry - try next */ /* Negative dentry - try next */
if (!simple_positive(ret)) { if (!simple_positive(ret)) {
spin_unlock(&p->d_lock); spin_unlock(&p->d_lock);
lock_set_subclass(&ret->d_lock.dep_map, 0, _RET_IP_);
p = ret; p = ret;
goto again; goto again;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment