NFSv4: Declare the size up to date after it was set.
Subsystems (2)
PATCH 1/1 NFSv4: Declare the size up to date after it was set.
When we've changed the file size, then ensure we declare it to be up to date in the inode attributes.
Signed-off-by Trond Myklebust <[email protected]>
--- fs/nfs/inode.c | 1 + fs/nfs/write.c | 1 + 2 files changed, 2 insertions(+)
fs/nfs/inode.c +1 -0
@@ -646,6 +646,7 @@ static int nfs_vmtruncate(struct inode * inode, loff_t offset)/* Optimisation */ if (offset ==0 )NFS_I (inode)->cache_validity &= ~NFS_INO_INVALID_DATA ; +NFS_I (inode)->cache_validity &= ~NFS_INO_INVALID_SIZE ;spin_unlock (&inode->i_lock);truncate_pagecache (inode, offset);
fs/nfs/write.c +1 -0
@@ -231,6 +231,7 @@ static void nfs_grow_file(struct page *page, unsigned int offset, unsigned int cif (i_size >= end) goto out;i_size_write (inode, end); +NFS_I (inode)->cache_validity &= ~NFS_INO_INVALID_SIZE ;nfs_inc_stats (inode,NFSIOS_EXTENDWRITE ); out:spin_unlock (&inode->i_lock);
Signature · 1 line
2.14.3