NFS: NFS_CACHEINV() should not test for nfs_caches_unstable()
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Sat, 29 Sep 2007 21:25:43 +0000 (17:25 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 9 Oct 2007 21:19:48 +0000 (17:19 -0400)
The fact that we're in the process of modifying the inode does not mean
that we should not invalidate the attribute and data caches. The defensive
thing is to always invalidate when we're confronted with inode
mtime/ctime or change_attribute updates that we do not immediately
recognise.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/dir.c
include/linux/nfs_fs.h

index 35b447d79dbea1b56507bf1b10644b7aaff40479..a03ed2f85047e70cdf92b8e0dd9a0229b9257ca2 100644 (file)
@@ -788,7 +788,7 @@ static int nfs_lookup_revalidate(struct dentry * dentry, struct nameidata *nd)
 out_zap_parent:
        nfs_zap_caches(dir);
  out_bad:
-       NFS_CACHEINV(dir);
+       nfs_mark_for_revalidate(dir);
        if (inode && S_ISDIR(inode->i_mode)) {
                /* Purge readdir caches. */
                nfs_zap_caches(inode);
index 35d61924e0b9f1fe5dbe4916d8eec740b798e3f8..c947803a7ba48b9af7dddad0db29df8c8501e26e 100644 (file)
@@ -240,12 +240,6 @@ static inline void nfs_mark_for_revalidate(struct inode *inode)
        spin_unlock(&inode->i_lock);
 }
 
-static inline void NFS_CACHEINV(struct inode *inode)
-{
-       if (!nfs_caches_unstable(inode))
-               nfs_mark_for_revalidate(inode);
-}
-
 static inline int nfs_server_capable(struct inode *inode, int cap)
 {
        return NFS_SERVER(inode)->caps & cap;
This page took 0.093648 seconds and 5 git commands to generate.