diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-07-21 15:43:43 +0200 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-07-21 15:46:42 +0200 |
commit | e033fb51ebb2983ee17b4a1b96ccbaedb137d9e9 (patch) | |
tree | 8f2b13c16a4b01b3ce6b5fd16baa9f578f72535c /fs | |
parent | pNFS: Don't mark the inode as revalidated if a LAYOUTCOMMIT is outstanding (diff) | |
download | linux-e033fb51ebb2983ee17b4a1b96ccbaedb137d9e9.tar.xz linux-e033fb51ebb2983ee17b4a1b96ccbaedb137d9e9.zip |
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 <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/filelayout/filelayout.c | 6 |
1 files changed, 6 insertions, 0 deletions
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; } |