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.2.2~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=717766170de50784cf9b8100a105a8452e3aedd6;p=thirdparty%2Fkernel%2Fstable.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 b3289d701eea2..e31e8fe0e5ec6 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; }