diff options
Diffstat (limited to 'fs/namespace.c')
-rw-r--r-- | fs/namespace.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index 6c115d86a157..64db957bb992 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -586,7 +586,8 @@ static void dentry_reset_mounted(struct vfsmount *mnt, struct dentry *dentry) { if (!__lookup_mnt(mnt, dentry, 0)) { spin_lock(&dentry->d_lock); - dentry->d_flags &= ~DCACHE_MOUNTED; + WARN_ON(dentry->d_mounted == 0); + dentry->d_mounted--; spin_unlock(&dentry->d_lock); } } @@ -610,7 +611,7 @@ void mnt_set_mountpoint(struct vfsmount *mnt, struct dentry *dentry, child_mnt->mnt_parent = mntget(mnt); spin_lock(&dentry->d_lock); child_mnt->mnt_mountpoint = dget_dlock(dentry); - dentry->d_flags |= DCACHE_MOUNTED; + dentry->d_mounted++; spin_unlock(&dentry->d_lock); } |