From: Trond Myklebust Date: Thu, 21 Jul 2016 13:43:43 +0000 (-0400) Subject: pNFS/files: filelayout_write_done_cb must call nfs_writeback_update_inode() X-Git-Tag: v4.8-rc1~87^2~6^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e033fb51ebb2983ee17b4a1b96ccbaedb137d9e9;p=karo-tx-linux.git pNFS/files: filelayout_write_done_cb must call nfs_writeback_update_inode() All write callbacks are required to call nfs_writeback_update_inode() upon success to ensure that file size changes are recorded, and the attribute cache is invalidated. Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/filelayout/filelayout.c b/fs/nfs/filelayout/filelayout.c index 25bd91a6e088..a3fc48ba4931 100644 --- a/fs/nfs/filelayout/filelayout.c +++ b/fs/nfs/filelayout/filelayout.c @@ -357,6 +357,12 @@ static int filelayout_write_done_cb(struct rpc_task *task, } filelayout_set_layoutcommit(hdr); + + /* zero out the fattr */ + hdr->fattr.valid = 0; + if (task->tk_status >= 0) + nfs_writeback_update_inode(hdr); + return 0; }