From: Peng Tao Date: Wed, 19 Aug 2015 17:52:59 +0000 (+0800) Subject: NFS41/flexfiles: update inode after write finishes X-Git-Tag: v4.1.9~99 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=73e8e7b2bbf68ddc590a0e725c2099fe0fa75b6a;p=users%2Fjedix%2Flinux-maple.git NFS41/flexfiles: update inode after write finishes commit 69f230d907e8c1ca3f9bd528993eeb98f712b0dd upstream. Otherwise we break fstest case tests/read_write/mctime.t Does files layout need the same fix as well? Cc: Anna Schumaker Signed-off-by: Peng Tao Signed-off-by: Trond Myklebust Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c index 6f5f0f425e86..64604cf3af31 100644 --- a/fs/nfs/flexfilelayout/flexfilelayout.c +++ b/fs/nfs/flexfilelayout/flexfilelayout.c @@ -1039,6 +1039,9 @@ static int ff_layout_write_done_cb(struct rpc_task *task, hdr->res.verf->committed == NFS_DATA_SYNC) ff_layout_set_layoutcommit(hdr); + if (task->tk_status >= 0) + nfs_writeback_update_inode(hdr); + return 0; }