aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/inode.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2018-03-27 17:10:42 -0400
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2018-04-10 16:06:22 -0400
commitf6cdfa6dd629604d6a6af4de92b9c6eea6d52b1c (patch)
tree030f490d58d26df3704d1b7a55f9e39e149fe91a /fs/nfs/inode.c
parentnfs: Use ida_simple API (diff)
downloadlinux-dev-f6cdfa6dd629604d6a6af4de92b9c6eea6d52b1c.tar.xz
linux-dev-f6cdfa6dd629604d6a6af4de92b9c6eea6d52b1c.zip
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>
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r--fs/nfs/inode.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index a2c5d4ad4535..ba73eda0600e 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -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);