diff options
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r-- | fs/nfs/inode.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 469387920dd9..c44cd02e5181 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -876,11 +876,19 @@ int nfs_post_op_update_inode(struct inode *inode, struct nfs_fattr *fattr) | |||
876 | { | 876 | { |
877 | struct nfs_inode *nfsi = NFS_I(inode); | 877 | struct nfs_inode *nfsi = NFS_I(inode); |
878 | 878 | ||
879 | if (fattr->valid & NFS_ATTR_FATTR) | 879 | if (fattr->valid & NFS_ATTR_FATTR) { |
880 | if (S_ISDIR(inode->i_mode)) { | ||
881 | spin_lock(&inode->i_lock); | ||
882 | nfsi->cache_validity |= NFS_INO_INVALID_DATA; | ||
883 | spin_unlock(&inode->i_lock); | ||
884 | } | ||
880 | return nfs_refresh_inode(inode, fattr); | 885 | return nfs_refresh_inode(inode, fattr); |
886 | } | ||
881 | 887 | ||
882 | spin_lock(&inode->i_lock); | 888 | spin_lock(&inode->i_lock); |
883 | nfsi->cache_validity |= NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ATTR|NFS_INO_REVAL_PAGECACHE; | 889 | nfsi->cache_validity |= NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ATTR|NFS_INO_REVAL_PAGECACHE; |
890 | if (S_ISDIR(inode->i_mode)) | ||
891 | nfsi->cache_validity |= NFS_INO_INVALID_DATA; | ||
884 | spin_unlock(&inode->i_lock); | 892 | spin_unlock(&inode->i_lock); |
885 | return 0; | 893 | return 0; |
886 | } | 894 | } |