]> git.baikalelectronics.ru Git - kernel.git/commitdiff
NFS: When resending after a short write, reset the reply count to zero
authorTrond Myklebust <trondmy@gmail.com>
Mon, 6 Jan 2020 20:25:13 +0000 (15:25 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Wed, 15 Jan 2020 15:54:33 +0000 (10:54 -0500)
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>
fs/nfs/read.c
fs/nfs/write.c

index 12deb3bdb2a0f544ee2a63987cbad96453266959..34bb9add2302fd3e1181dd26451e4453ab490256 100644 (file)
@@ -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);
 }
 
index 83f92a4d65dc13d082c42ba674e4ecd6099e8060..c478b772cc49a3a583611612ef54714cfbea5437 100644 (file)
@@ -1658,6 +1658,8 @@ static void nfs_writeback_result(struct rpc_task *task,
                         */
                        argp->stable = NFS_FILE_SYNC;
                }
+               resp->count = 0;
+               resp->verf->committed = 0;
                rpc_restart_call_prepare(task);
        }
 }