aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfs/inode.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index cb5c65f0bc12..a56add0bc5b7 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -717,13 +717,11 @@ void nfs_end_data_update(struct inode *inode)
717{ 717{
718 struct nfs_inode *nfsi = NFS_I(inode); 718 struct nfs_inode *nfsi = NFS_I(inode);
719 719
720 if (!nfs_have_delegation(inode, FMODE_READ)) { 720 /* Directories: invalidate page cache */
721 /* Directories and symlinks: invalidate page cache */ 721 if (S_ISDIR(inode->i_mode)) {
722 if (S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode)) { 722 spin_lock(&inode->i_lock);
723 spin_lock(&inode->i_lock); 723 nfsi->cache_validity |= NFS_INO_INVALID_DATA;
724 nfsi->cache_validity |= NFS_INO_INVALID_DATA; 724 spin_unlock(&inode->i_lock);
725 spin_unlock(&inode->i_lock);
726 }
727 } 725 }
728 nfsi->cache_change_attribute = jiffies; 726 nfsi->cache_change_attribute = jiffies;
729 atomic_dec(&nfsi->data_updates); 727 atomic_dec(&nfsi->data_updates);