diff options
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r-- | fs/nfs/inode.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index f1f6639f52b5..7e73edc1751f 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -791,24 +791,18 @@ void nfs_end_data_update(struct inode *inode) | |||
791 | static void nfs_wcc_update_inode(struct inode *inode, struct nfs_fattr *fattr) | 791 | static void nfs_wcc_update_inode(struct inode *inode, struct nfs_fattr *fattr) |
792 | { | 792 | { |
793 | struct nfs_inode *nfsi = NFS_I(inode); | 793 | struct nfs_inode *nfsi = NFS_I(inode); |
794 | unsigned long now = jiffies; | ||
795 | 794 | ||
796 | /* If we have atomic WCC data, we may update some attributes */ | 795 | /* If we have atomic WCC data, we may update some attributes */ |
797 | if ((fattr->valid & NFS_ATTR_WCC) != 0) { | 796 | if ((fattr->valid & NFS_ATTR_WCC) != 0) { |
798 | if (timespec_equal(&inode->i_ctime, &fattr->pre_ctime)) { | 797 | if (timespec_equal(&inode->i_ctime, &fattr->pre_ctime)) |
799 | memcpy(&inode->i_ctime, &fattr->ctime, sizeof(inode->i_ctime)); | 798 | memcpy(&inode->i_ctime, &fattr->ctime, sizeof(inode->i_ctime)); |
800 | nfsi->cache_change_attribute = now; | ||
801 | } | ||
802 | if (timespec_equal(&inode->i_mtime, &fattr->pre_mtime)) { | 799 | if (timespec_equal(&inode->i_mtime, &fattr->pre_mtime)) { |
803 | memcpy(&inode->i_mtime, &fattr->mtime, sizeof(inode->i_mtime)); | 800 | memcpy(&inode->i_mtime, &fattr->mtime, sizeof(inode->i_mtime)); |
804 | if (S_ISDIR(inode->i_mode)) | 801 | if (S_ISDIR(inode->i_mode)) |
805 | nfsi->cache_validity |= NFS_INO_INVALID_DATA; | 802 | nfsi->cache_validity |= NFS_INO_INVALID_DATA; |
806 | nfsi->cache_change_attribute = now; | ||
807 | } | 803 | } |
808 | if (inode->i_size == fattr->pre_size && nfsi->npages == 0) { | 804 | if (inode->i_size == fattr->pre_size && nfsi->npages == 0) |
809 | inode->i_size = fattr->size; | 805 | inode->i_size = fattr->size; |
810 | nfsi->cache_change_attribute = now; | ||
811 | } | ||
812 | } | 806 | } |
813 | } | 807 | } |
814 | 808 | ||
@@ -919,6 +913,7 @@ int nfs_post_op_update_inode(struct inode *inode, struct nfs_fattr *fattr) | |||
919 | if (unlikely((fattr->valid & NFS_ATTR_FATTR) == 0)) { | 913 | if (unlikely((fattr->valid & NFS_ATTR_FATTR) == 0)) { |
920 | spin_lock(&inode->i_lock); | 914 | spin_lock(&inode->i_lock); |
921 | nfsi->cache_validity |= NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ATTR|NFS_INO_REVAL_PAGECACHE; | 915 | nfsi->cache_validity |= NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ATTR|NFS_INO_REVAL_PAGECACHE; |
916 | nfsi->cache_change_attribute = jiffies; | ||
922 | spin_unlock(&inode->i_lock); | 917 | spin_unlock(&inode->i_lock); |
923 | goto out; | 918 | goto out; |
924 | } | 919 | } |