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 <trond.myklebust@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:

committed by
Anna Schumaker

parent
aae5730e2d
commit
f6cdfa6dd6
@@ -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);
|
||||
|
Reference in New Issue
Block a user