summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2006-09-14 14:03:14 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-09-22 23:25:03 -0400
commit97db8f41792839a6912fd21be8b61dd6c50db58f (patch)
treeb569931dd76809ef4bee9165da54d1c34310fbe4 /fs
parent5f004cf2aa8494708fd8d78e78142b7b2748e765 (diff)
downloadop-kernel-dev-97db8f41792839a6912fd21be8b61dd6c50db58f.zip
op-kernel-dev-97db8f41792839a6912fd21be8b61dd6c50db58f.tar.gz
NFS: Don't invalidate the symlink we just stuffed into the cache
And slight optimisation of nfs_end_data_update(): directories never have delegations anyway. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-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 cb5c65f..a56add0 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -717,13 +717,11 @@ void nfs_end_data_update(struct inode *inode)
{
struct nfs_inode *nfsi = NFS_I(inode);
- if (!nfs_have_delegation(inode, FMODE_READ)) {
- /* Directories and symlinks: invalidate page cache */
- if (S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode)) {
- spin_lock(&inode->i_lock);
- nfsi->cache_validity |= NFS_INO_INVALID_DATA;
- spin_unlock(&inode->i_lock);
- }
+ /* Directories: invalidate page cache */
+ if (S_ISDIR(inode->i_mode)) {
+ spin_lock(&inode->i_lock);
+ nfsi->cache_validity |= NFS_INO_INVALID_DATA;
+ spin_unlock(&inode->i_lock);
}
nfsi->cache_change_attribute = jiffies;
atomic_dec(&nfsi->data_updates);
OpenPOWER on IntegriCloud