aboutsummaryrefslogtreecommitdiffstats
path: root/fs/autofs4/waitq.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/autofs4/waitq.c')
-rw-r--r--fs/autofs4/waitq.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c
index 4be8f778a418..c5f8459c905e 100644
--- a/fs/autofs4/waitq.c
+++ b/fs/autofs4/waitq.c
@@ -194,14 +194,15 @@ static int autofs4_getpath(struct autofs_sb_info *sbi,
194rename_retry: 194rename_retry:
195 buf = *name; 195 buf = *name;
196 len = 0; 196 len = 0;
197
197 seq = read_seqbegin(&rename_lock); 198 seq = read_seqbegin(&rename_lock);
198 rcu_read_lock(); 199 rcu_read_lock();
199 spin_lock(&dcache_lock); 200 spin_lock(&autofs4_lock);
200 for (tmp = dentry ; tmp != root ; tmp = tmp->d_parent) 201 for (tmp = dentry ; tmp != root ; tmp = tmp->d_parent)
201 len += tmp->d_name.len + 1; 202 len += tmp->d_name.len + 1;
202 203
203 if (!len || --len > NAME_MAX) { 204 if (!len || --len > NAME_MAX) {
204 spin_unlock(&dcache_lock); 205 spin_unlock(&autofs4_lock);
205 rcu_read_unlock(); 206 rcu_read_unlock();
206 if (read_seqretry(&rename_lock, seq)) 207 if (read_seqretry(&rename_lock, seq))
207 goto rename_retry; 208 goto rename_retry;
@@ -217,7 +218,7 @@ rename_retry:
217 p -= tmp->d_name.len; 218 p -= tmp->d_name.len;
218 strncpy(p, tmp->d_name.name, tmp->d_name.len); 219 strncpy(p, tmp->d_name.name, tmp->d_name.len);
219 } 220 }
220 spin_unlock(&dcache_lock); 221 spin_unlock(&autofs4_lock);
221 rcu_read_unlock(); 222 rcu_read_unlock();
222 if (read_seqretry(&rename_lock, seq)) 223 if (read_seqretry(&rename_lock, seq))
223 goto rename_retry; 224 goto rename_retry;