Commit e033fb51 authored by Trond Myklebust's avatar Trond Myklebust

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: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent 10b7e9ad
...@@ -357,6 +357,12 @@ static int filelayout_write_done_cb(struct rpc_task *task, ...@@ -357,6 +357,12 @@ static int filelayout_write_done_cb(struct rpc_task *task,
} }
filelayout_set_layoutcommit(hdr); filelayout_set_layoutcommit(hdr);
/* zero out the fattr */
hdr->fattr.valid = 0;
if (task->tk_status >= 0)
nfs_writeback_update_inode(hdr);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment