aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/fs/dcache.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-06-17 14:44:05 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2015-06-17 14:44:05 -0400
commit4ef51e8b7aaa67493ad5b36a0e5874bf6ff8b956 (patch)
tree932b180b18a96120ac68f85f7de0d3cdac320b1b /fs/dcache.c
parentturn user_{path_at,path,lpath,path_dir}() into static inlines (diff)
parentfs/ufs: restore s_lock mutex_init() (diff)
downloadwireguard-linux-4ef51e8b7aaa67493ad5b36a0e5874bf6ff8b956.tar.xz
wireguard-linux-4ef51e8b7aaa67493ad5b36a0e5874bf6ff8b956.zip
Merge branch 'for-linus' into for-next
Diffstat (limited to 'fs/dcache.c')
-rw-r--r--fs/dcache.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index 656ce522a218..37b5afdaf698 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1239,13 +1239,13 @@ ascend:
/* might go back up the wrong parent if we have had a rename. */
if (need_seqretry(&rename_lock, seq))
goto rename_retry;
- next = child->d_child.next;
- while (unlikely(child->d_flags & DCACHE_DENTRY_KILLED)) {
+ /* go into the first sibling still alive */
+ do {
+ next = child->d_child.next;
if (next == &this_parent->d_subdirs)
goto ascend;
child = list_entry(next, struct dentry, d_child);
- next = next->next;
- }
+ } while (unlikely(child->d_flags & DCACHE_DENTRY_KILLED));
rcu_read_unlock();
goto resume;
}