Commit 65c0ce81 authored by Trond Myklebust's avatar Trond Myklebust Committed by Kleber Sacilotto de Souza

NFSv2: Fix write regression

BugLink: https://bugs.launchpad.net/bugs/1845405

[ Upstream commit d33d4beb ]

Ensure we update the write result count on success, since the
RPC call itself does not do so.
Reported-by: default avatarJan Stancek <jstancek@redhat.com>
Reported-by: default avatarNaresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
Tested-by: default avatarJan Stancek <jstancek@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarConnor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 87e9aea7
......@@ -610,8 +610,10 @@ static int nfs_proc_pgio_rpc_prepare(struct rpc_task *task,
static int nfs_write_done(struct rpc_task *task, struct nfs_pgio_header *hdr)
{
if (task->tk_status >= 0)
if (task->tk_status >= 0) {
hdr->res.count = hdr->args.count;
nfs_writeback_update_inode(hdr);
}
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment