aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r--fs/nfs/inode.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 3a2d127de499..299bf7171a4d 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -1738,6 +1738,7 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
1738 nfs_inc_stats(inode, NFSIOS_ATTRINVALIDATE); 1738 nfs_inc_stats(inode, NFSIOS_ATTRINVALIDATE);
1739 nfsi->attrtimeo = NFS_MINATTRTIMEO(inode); 1739 nfsi->attrtimeo = NFS_MINATTRTIMEO(inode);
1740 nfsi->attrtimeo_timestamp = now; 1740 nfsi->attrtimeo_timestamp = now;
1741 /* Set barrier to be more recent than all outstanding updates */
1741 nfsi->attr_gencount = nfs_inc_attr_generation_counter(); 1742 nfsi->attr_gencount = nfs_inc_attr_generation_counter();
1742 } else { 1743 } else {
1743 if (!time_in_range_open(now, nfsi->attrtimeo_timestamp, nfsi->attrtimeo_timestamp + nfsi->attrtimeo)) { 1744 if (!time_in_range_open(now, nfsi->attrtimeo_timestamp, nfsi->attrtimeo_timestamp + nfsi->attrtimeo)) {
@@ -1745,6 +1746,9 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
1745 nfsi->attrtimeo = NFS_MAXATTRTIMEO(inode); 1746 nfsi->attrtimeo = NFS_MAXATTRTIMEO(inode);
1746 nfsi->attrtimeo_timestamp = now; 1747 nfsi->attrtimeo_timestamp = now;
1747 } 1748 }
1749 /* Set the barrier to be more recent than this fattr */
1750 if ((long)fattr->gencount - (long)nfsi->attr_gencount > 0)
1751 nfsi->attr_gencount = fattr->gencount;
1748 } 1752 }
1749 invalid &= ~NFS_INO_INVALID_ATTR; 1753 invalid &= ~NFS_INO_INVALID_ATTR;
1750 /* Don't invalidate the data if we were to blame */ 1754 /* Don't invalidate the data if we were to blame */