]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/sysfs/dir.c
vfs: Lazily remove mounts on unlinked files and directories. v2
[karo-tx-linux.git] / fs / sysfs / dir.c
index 4d83cedb9fcb6a98b784bb7e5d67472b9e96e289..477c66d4e2a85a4a81962993feda816ee1e2a76f 100644 (file)
@@ -327,7 +327,6 @@ static int sysfs_dentry_revalidate(struct dentry *dentry, unsigned int flags)
        }
 
        mutex_unlock(&sysfs_mutex);
-out_valid:
        return 1;
 out_bad:
        /* Remove the dentry from the dcache hashes.
@@ -341,13 +340,7 @@ out_bad:
         * to the dcache hashes.
         */
        mutex_unlock(&sysfs_mutex);
-
-       /* If we have submounts we must allow the vfs caches
-        * to lie about the state of the filesystem to prevent
-        * leaks and other nasty things.
-        */
-       if (check_submounts_and_drop(dentry) != 0)
-               goto out_valid;
+       shrink_submounts_and_drop(dentry);
 
        return 0;
 }