diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2019-08-27 13:03:28 +0200 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2019-08-27 16:24:56 +0200 |
commit | d33d4beb522987d1c305c12500796f9be3687dee (patch) | |
tree | 8c0dd613c6f870a4ae8e0584643d110dc84ee066 /fs | |
parent | NFSv2: Fix eof handling (diff) | |
download | linux-d33d4beb522987d1c305c12500796f9be3687dee.tar.xz linux-d33d4beb522987d1c305c12500796f9be3687dee.zip |
NFSv2: Fix write regression
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/proc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfs/proc.c b/fs/nfs/proc.c index ec79d2214a78..0f7288b94633 100644 --- a/fs/nfs/proc.c +++ b/fs/nfs/proc.c @@ -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; } |