Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[cascardo/linux.git] / fs / proc / base.c
index 950100e..772efa4 100644 (file)
@@ -1565,7 +1565,6 @@ int pid_revalidate(struct dentry *dentry, unsigned int flags)
                put_task_struct(task);
                return 1;
        }
-       d_drop(dentry);
        return 0;
 }
 
@@ -1702,9 +1701,6 @@ out:
        put_task_struct(task);
 
 out_notask:
-       if (status <= 0)
-               d_drop(dentry);
-
        return status;
 }
 
@@ -2618,8 +2614,7 @@ static void proc_flush_task_mnt(struct vfsmount *mnt, pid_t pid, pid_t tgid)
        /* no ->d_hash() rejects on procfs */
        dentry = d_hash_and_lookup(mnt->mnt_root, &name);
        if (dentry) {
-               shrink_dcache_parent(dentry);
-               d_drop(dentry);
+               d_invalidate(dentry);
                dput(dentry);
        }
 
@@ -2639,8 +2634,7 @@ static void proc_flush_task_mnt(struct vfsmount *mnt, pid_t pid, pid_t tgid)
        name.len = snprintf(buf, sizeof(buf), "%d", pid);
        dentry = d_hash_and_lookup(dir, &name);
        if (dentry) {
-               shrink_dcache_parent(dentry);
-               d_drop(dentry);
+               d_invalidate(dentry);
                dput(dentry);
        }