summaryrefslogtreecommitdiffstats
path: root/fs/nfs/read.c
diff options
context:
space:
mode:
authorTrond Myklebust <trondmy@gmail.com>2020-01-06 21:25:13 +0100
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2020-01-15 16:54:33 +0100
commit8c9cb71491e7fd3ebee90d9799c9ca5b769bd0f4 (patch)
tree9193f0a93d2730a8757f30053ebad9b114552b4a /fs/nfs/read.c
parentNFS: Improve tracing of permission calls (diff)
downloadlinux-8c9cb71491e7fd3ebee90d9799c9ca5b769bd0f4.tar.xz
linux-8c9cb71491e7fd3ebee90d9799c9ca5b769bd0f4.zip
NFS: When resending after a short write, reset the reply count to zero
If we're resending a write due to a short read or write, ensure we reset the reply count to zero. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs/nfs/read.c')
-rw-r--r--fs/nfs/read.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/read.c b/fs/nfs/read.c
index 12deb3bdb2a0..34bb9add2302 100644
--- a/fs/nfs/read.c
+++ b/fs/nfs/read.c
@@ -281,6 +281,8 @@ static void nfs_readpage_retry(struct rpc_task *task,
argp->offset += resp->count;
argp->pgbase += resp->count;
argp->count -= resp->count;
+ resp->count = 0;
+ resp->eof = 0;
rpc_restart_call_prepare(task);
}