arm64: dts: rockchip: rk3399: add aclk/hclk_vop init freq
[firefly-linux-kernel-4.4.55.git] / fs / dcache.c
index 9e5099997fcd8da473bbdf50211873108c4f7194..7b8feb6d60c8285234d4dd7cbd82b7604addf484 100644 (file)
@@ -1322,8 +1322,11 @@ int d_set_mounted(struct dentry *dentry)
        }
        spin_lock(&dentry->d_lock);
        if (!d_unlinked(dentry)) {
-               dentry->d_flags |= DCACHE_MOUNTED;
-               ret = 0;
+               ret = -EBUSY;
+               if (!d_mountpoint(dentry)) {
+                       dentry->d_flags |= DCACHE_MOUNTED;
+                       ret = 0;
+               }
        }
        spin_unlock(&dentry->d_lock);
 out: