diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-07-21 09:43:43 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-07-21 09:46:42 -0400 |
commit | e033fb51ebb2983ee17b4a1b96ccbaedb137d9e9 (patch) | |
tree | 8f2b13c16a4b01b3ce6b5fd16baa9f578f72535c | |
parent | 10b7e9ad44881fcd46ac24eb7374377c6e8962ed (diff) |
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>
-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, | |||
357 | } | 357 | } |
358 | 358 | ||
359 | filelayout_set_layoutcommit(hdr); | 359 | filelayout_set_layoutcommit(hdr); |
360 | |||
361 | /* zero out the fattr */ | ||
362 | hdr->fattr.valid = 0; | ||
363 | if (task->tk_status >= 0) | ||
364 | nfs_writeback_update_inode(hdr); | ||
365 | |||
360 | return 0; | 366 | return 0; |
361 | } | 367 | } |
362 | 368 | ||