Skip to content

Commit

Permalink
pNFS/files: filelayout_write_done_cb must call nfs_writeback_update_i…
Browse files Browse the repository at this point in the history
…node()

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>
  • Loading branch information
Trond Myklebust committed Jul 21, 2016
1 parent 10b7e9a commit e033fb5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fs/nfs/filelayout/filelayout.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit e033fb5

Please sign in to comment.