summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfs/inode.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index d8e8bf9da211..6e5a96e2e9a0 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -1799,6 +1799,8 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
1799 | NFS_INO_INVALID_DATA 1799 | NFS_INO_INVALID_DATA
1800 | NFS_INO_INVALID_ACCESS 1800 | NFS_INO_INVALID_ACCESS
1801 | NFS_INO_INVALID_ACL; 1801 | NFS_INO_INVALID_ACL;
1802 /* Force revalidate of all attributes */
1803 save_cache_validity |= NFS_INO_INVALID_ATTR;
1802 if (S_ISDIR(inode->i_mode)) 1804 if (S_ISDIR(inode->i_mode))
1803 nfs_force_lookup_revalidate(inode); 1805 nfs_force_lookup_revalidate(inode);
1804 } 1806 }
@@ -1937,6 +1939,7 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
1937 1939
1938 /* Update attrtimeo value if we're out of the unstable period */ 1940 /* Update attrtimeo value if we're out of the unstable period */
1939 if (invalid & NFS_INO_INVALID_ATTR) { 1941 if (invalid & NFS_INO_INVALID_ATTR) {
1942 invalid &= ~NFS_INO_INVALID_ATTR;
1940 nfs_inc_stats(inode, NFSIOS_ATTRINVALIDATE); 1943 nfs_inc_stats(inode, NFSIOS_ATTRINVALIDATE);
1941 nfsi->attrtimeo = NFS_MINATTRTIMEO(inode); 1944 nfsi->attrtimeo = NFS_MINATTRTIMEO(inode);
1942 nfsi->attrtimeo_timestamp = now; 1945 nfsi->attrtimeo_timestamp = now;
@@ -1957,10 +1960,6 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
1957 nfsi->attr_gencount = fattr->gencount; 1960 nfsi->attr_gencount = fattr->gencount;
1958 } 1961 }
1959 1962
1960 /* Don't declare attrcache up to date if there were no attrs! */
1961 if (cache_revalidated)
1962 invalid &= ~NFS_INO_INVALID_ATTR;
1963
1964 /* Don't invalidate the data if we were to blame */ 1963 /* Don't invalidate the data if we were to blame */
1965 if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) 1964 if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode)
1966 || S_ISLNK(inode->i_mode))) 1965 || S_ISLNK(inode->i_mode)))