Skip to content

Commit

Permalink
NFSv2: Fix write regression
Browse files Browse the repository at this point in the history
Ensure we update the write result count on success, since the
RPC call itself does not do so.

Reported-by: Jan Stancek <jstancek@redhat.com>
Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Tested-by: Jan Stancek <jstancek@redhat.com>
  • Loading branch information
Trond Myklebust committed Aug 27, 2019
1 parent 71affe9 commit d33d4be
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/nfs/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit d33d4be

Please sign in to comment.