From: Al Viro Date: Fri, 30 Nov 2012 03:00:51 +0000 (-0500) Subject: don't do blind d_drop() in nfs_prime_dcache() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=696199f8ccf7fc6d17ef89c296ad3b6c78c52d9c;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git don't do blind d_drop() in nfs_prime_dcache() Signed-off-by: Al Viro --- diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index ce8cb926526b..99489cfca24d 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -450,7 +450,8 @@ void nfs_prime_dcache(struct dentry *parent, struct nfs_entry *entry) nfs_refresh_inode(dentry->d_inode, entry->fattr); goto out; } else { - d_drop(dentry); + if (d_invalidate(dentry) != 0) + goto out; dput(dentry); } }