]> git.hungrycats.org Git - linux/commitdiff
NFS41/flexfiles: update inode after write finishes
authorPeng Tao <tao.peng@primarydata.com>
Wed, 19 Aug 2015 17:52:59 +0000 (01:52 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Sep 2015 17:26:09 +0000 (19:26 +0200)
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 <anna.schumaker@netapp.com>
Signed-off-by: Peng Tao <tao.peng@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/flexfilelayout/flexfilelayout.c

index 6f5f0f425e86bba5335679d6690c7dca1c885862..64604cf3af317b2521f43b9a7e7bc0a744dee64d 100644 (file)
@@ -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;
 }