+4
-4
fs/dcache.c
+4
-4
fs/dcache.c
···
1239
1239
/* might go back up the wrong parent if we have had a rename. */
1240
1240
if (need_seqretry(&rename_lock, seq))
1241
1241
goto rename_retry;
1242
-
next = child->d_child.next;
1243
-
while (unlikely(child->d_flags & DCACHE_DENTRY_KILLED)) {
1242
+
/* go into the first sibling still alive */
1243
+
do {
1244
+
next = child->d_child.next;
1244
1245
if (next == &this_parent->d_subdirs)
1245
1246
goto ascend;
1246
1247
child = list_entry(next, struct dentry, d_child);
1247
-
next = next->next;
1248
-
}
1248
+
} while (unlikely(child->d_flags & DCACHE_DENTRY_KILLED));
1249
1249
rcu_read_unlock();
1250
1250
goto resume;
1251
1251
}