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 /fs | |
parent | 10b7e9ad44881fcd46ac24eb7374377c6e8962ed (diff) | |
download | linux-stable-e033fb51ebb2983ee17b4a1b96ccbaedb137d9e9.tar.gz linux-stable-e033fb51ebb2983ee17b4a1b96ccbaedb137d9e9.tar.bz2 linux-stable-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; } |