Commit 9ec4b1b0 authored by Trond Myklebust's avatar Trond Myklebust Committed by Linus Torvalds

[PATCH] Reduce number of LOOKUP calls in nfs_lookup_revalidate()

fs/nfs/inode.c:
  - Ensure that we initialize NFS_MTIME_UPDATE(inode).

  - If a directory's mtime changed due to some action on our part
    (file creation/deletion/...) don't force a dcache revalidation by
    changing NFS_MTIME_UPDATE(inode).
parent 41384f82
......@@ -693,6 +693,7 @@ __nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr)
inode->i_atime = new_atime;
NFS_CACHE_MTIME(inode) = new_mtime;
inode->i_mtime = nfs_time_to_secs(new_mtime);
NFS_MTIME_UPDATE(inode) = jiffies;
NFS_CACHE_ISIZE(inode) = new_size;
inode->i_size = new_isize;
inode->i_mode = fattr->mode;
......@@ -1058,6 +1059,7 @@ __nfs_refresh_inode(struct inode *inode, struct nfs_fattr *fattr)
inode->i_atime = new_atime;
if (NFS_CACHE_MTIME(inode) != new_mtime) {
if (invalid)
NFS_MTIME_UPDATE(inode) = jiffies;
NFS_CACHE_MTIME(inode) = new_mtime;
inode->i_mtime = nfs_time_to_secs(new_mtime);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment