diff options
author | Trond Myklebust | 2007-09-28 23:11:45 +0200 |
---|---|---|
committer | Trond Myklebust | 2007-10-09 23:19:03 +0200 |
commit | c4812998398d9cbce8646494704c52297359ede0 (patch) | |
tree | 8c7b786779b03d1960c25800a7a27a10f8318e99 /fs/nfs/inode.c | |
parent | NFS: Don't use readdirplus data if the page cache is invalid (diff) | |
download | kernel-qcow2-linux-c4812998398d9cbce8646494704c52297359ede0.tar.gz kernel-qcow2-linux-c4812998398d9cbce8646494704c52297359ede0.tar.xz kernel-qcow2-linux-c4812998398d9cbce8646494704c52297359ede0.zip |
NFS: Fix atime revalidation in readdir()
NFSv3 will correctly update atime on a readdir call, so there is no need to
set the NFS_INO_INVALID_ATIME flag unless the call to nfs_refresh_inode()
fails.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r-- | fs/nfs/inode.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index cd57f795229e..e37faa3a7bac 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -156,6 +156,13 @@ static void nfs_zap_acl_cache(struct inode *inode) spin_unlock(&inode->i_lock); } +void nfs_invalidate_atime(struct inode *inode) +{ + spin_lock(&inode->i_lock); + NFS_I(inode)->cache_validity |= NFS_INO_INVALID_ATIME; + spin_unlock(&inode->i_lock); +} + /* * Invalidate, but do not unhash, the inode. * NB: must be called with inode->i_lock held! |