diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2019-08-27 07:03:28 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-09-21 07:17:02 +0200 |
commit | 0f7130177325cedca5155724d928139d9aa8acd6 (patch) | |
tree | 93426b33190b3fe03fe113e6ca7d121a724924d0 /fs/nfs/proc.c | |
parent | 60f0d449601d7c4c375ffd3083b4c65f0950288c (diff) | |
download | linux-stable-0f7130177325cedca5155724d928139d9aa8acd6.tar.gz linux-stable-0f7130177325cedca5155724d928139d9aa8acd6.tar.bz2 linux-stable-0f7130177325cedca5155724d928139d9aa8acd6.zip |
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: 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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/nfs/proc.c')
-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 89fa9c706b38..0e0335e77ce6 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; } |