Merge tag 'vfs-6.8.netfs' of gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs
[linux-2.6-block.git] / fs / afs / dynroot.c
index 9c517269ff9543268d668d1cafb5063801d2913c..d3bc4a2d708519624673be4fd0572e9080da732c 100644 (file)
@@ -373,7 +373,7 @@ error:
 void afs_dynroot_depopulate(struct super_block *sb)
 {
        struct afs_net *net = afs_sb2net(sb);
-       struct dentry *root = sb->s_root, *subdir, *tmp;
+       struct dentry *root = sb->s_root, *subdir;
 
        /* Prevent more subdirs from being created */
        mutex_lock(&net->proc_cells_lock);
@@ -382,10 +382,11 @@ void afs_dynroot_depopulate(struct super_block *sb)
        mutex_unlock(&net->proc_cells_lock);
 
        if (root) {
+               struct hlist_node *n;
                inode_lock(root->d_inode);
 
                /* Remove all the pins for dirs created for manually added cells */
-               list_for_each_entry_safe(subdir, tmp, &root->d_subdirs, d_child) {
+               hlist_for_each_entry_safe(subdir, n, &root->d_children, d_sib) {
                        if (subdir->d_fsdata) {
                                subdir->d_fsdata = NULL;
                                dput(subdir);