aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/autofs4/expire.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/autofs4/expire.c b/fs/autofs4/expire.c
index 3ed79d76c233..f43100b9662b 100644
--- a/fs/autofs4/expire.c
+++ b/fs/autofs4/expire.c
@@ -96,7 +96,7 @@ static struct dentry *get_next_positive_dentry(struct dentry *prev,
96 struct dentry *p, *ret; 96 struct dentry *p, *ret;
97 97
98 if (prev == NULL) 98 if (prev == NULL)
99 return dget(prev); 99 return dget(root);
100 100
101 spin_lock(&autofs4_lock); 101 spin_lock(&autofs4_lock);
102relock: 102relock:
@@ -133,7 +133,7 @@ again:
133 spin_lock_nested(&ret->d_lock, DENTRY_D_LOCK_NESTED); 133 spin_lock_nested(&ret->d_lock, DENTRY_D_LOCK_NESTED);
134 /* Negative dentry - try next */ 134 /* Negative dentry - try next */
135 if (!simple_positive(ret)) { 135 if (!simple_positive(ret)) {
136 spin_unlock(&ret->d_lock); 136 spin_unlock(&p->d_lock);
137 p = ret; 137 p = ret;
138 goto again; 138 goto again;
139 } 139 }