From: Peng Tao Date: Wed, 19 Aug 2015 17:52:59 +0000 (+0800) Subject: NFS41/flexfiles: update inode after write finishes X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=69f230d907e8c1ca3f9bd528993eeb98f712b0dd;p=deliverable%2Flinux.git NFS41/flexfiles: update inode after write finishes Otherwise we break fstest case tests/read_write/mctime.t Does files layout need the same fix as well? Cc: stable@vger.kernel.org # v4.0+ Cc: Anna Schumaker Signed-off-by: Peng Tao Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c index 13fe64b4e259..4bd3cff94190 100644 --- a/fs/nfs/flexfilelayout/flexfilelayout.c +++ b/fs/nfs/flexfilelayout/flexfilelayout.c @@ -1199,6 +1199,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; }