summaryrefslogtreecommitdiffstats
path: root/fs/nfs/write.c
diff options
context:
space:
mode:
authorTrond Myklebust2018-03-27 23:10:42 +0200
committerAnna Schumaker2018-04-10 22:06:22 +0200
commitf6cdfa6dd629604d6a6af4de92b9c6eea6d52b1c (patch)
tree030f490d58d26df3704d1b7a55f9e39e149fe91a /fs/nfs/write.c
parentnfs: Use ida_simple API (diff)
downloadkernel-qcow2-linux-f6cdfa6dd629604d6a6af4de92b9c6eea6d52b1c.tar.gz
kernel-qcow2-linux-f6cdfa6dd629604d6a6af4de92b9c6eea6d52b1c.tar.xz
kernel-qcow2-linux-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/write.c')
-rw-r--r--fs/nfs/write.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 3efce54ef1cd..541471a32784 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -231,6 +231,7 @@ static void nfs_grow_file(struct page *page, unsigned int offset, unsigned int c
if (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);