If the server sends a reply that is larger than the pre-allocated
buffer, then the current code may fail to register how much of
the stream that it has finished reading. This again can lead to
hangs.
Fixes: e92053a52e68 ("SUNRPC: Handle zero length fragments correctly")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
goto out;
if (ret != want)
goto out;
goto out;
if (ret != want)
goto out;
+ } else if (offset < seek_init)
offset = seek_init;
ret = -EMSGSIZE;
out:
offset = seek_init;
ret = -EMSGSIZE;
out: