Skip to content

Commit

Permalink
NFS: Don't invalidate the symlink we just stuffed into the cache
Browse files Browse the repository at this point in the history
And slight optimisation of nfs_end_data_update(): directories never have
delegations anyway.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Sep 23, 2006
1 parent 5f004cf commit 97db8f4
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions fs/nfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 97db8f4

Please sign in to comment.