diff options
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r-- | fs/nfs/dir.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index ce8cb926526b..b9e66b7e0c14 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) | |||
450 | nfs_refresh_inode(dentry->d_inode, entry->fattr); | 450 | nfs_refresh_inode(dentry->d_inode, entry->fattr); |
451 | goto out; | 451 | goto out; |
452 | } else { | 452 | } else { |
453 | d_drop(dentry); | 453 | if (d_invalidate(dentry) != 0) |
454 | goto out; | ||
454 | dput(dentry); | 455 | dput(dentry); |
455 | } | 456 | } |
456 | } | 457 | } |
@@ -1100,6 +1101,8 @@ out_set_verifier: | |||
1100 | out_zap_parent: | 1101 | out_zap_parent: |
1101 | nfs_zap_caches(dir); | 1102 | nfs_zap_caches(dir); |
1102 | out_bad: | 1103 | out_bad: |
1104 | nfs_free_fattr(fattr); | ||
1105 | nfs_free_fhandle(fhandle); | ||
1103 | nfs_mark_for_revalidate(dir); | 1106 | nfs_mark_for_revalidate(dir); |
1104 | if (inode && S_ISDIR(inode->i_mode)) { | 1107 | if (inode && S_ISDIR(inode->i_mode)) { |
1105 | /* Purge readdir caches. */ | 1108 | /* Purge readdir caches. */ |
@@ -1112,8 +1115,6 @@ out_zap_parent: | |||
1112 | shrink_dcache_parent(dentry); | 1115 | shrink_dcache_parent(dentry); |
1113 | } | 1116 | } |
1114 | d_drop(dentry); | 1117 | d_drop(dentry); |
1115 | nfs_free_fattr(fattr); | ||
1116 | nfs_free_fhandle(fhandle); | ||
1117 | dput(parent); | 1118 | dput(parent); |
1118 | dfprintk(LOOKUPCACHE, "NFS: %s(%s/%s) is invalid\n", | 1119 | dfprintk(LOOKUPCACHE, "NFS: %s(%s/%s) is invalid\n", |
1119 | __func__, dentry->d_parent->d_name.name, | 1120 | __func__, dentry->d_parent->d_name.name, |