提交 0f713017 编写于 作者: T Trond Myklebust 提交者: Greg Kroah-Hartman

NFSv2: Fix write regression

[ Upstream commit d33d4beb522987d1c305c12500796f9be3687dee ]

Ensure we update the write result count on success, since the
RPC call itself does not do so.
Reported-by: NJan Stancek <jstancek@redhat.com>
Reported-by: NNaresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
Tested-by: NJan Stancek <jstancek@redhat.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
上级 60f0d449
......@@ -616,8 +616,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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册