From: Vasily Khoruzhick Date: Mon, 14 May 2018 15:34:36 +0000 (-0700) Subject: net: nfs: don't fail when nfs_read_reply returns -NFS_RPC_DROP X-Git-Tag: v2018.07-rc2~51^2~10 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d48d40a09127dfcb1f073c3e44de4b858393ae9e;p=oweals%2Fu-boot.git net: nfs: don't fail when nfs_read_reply returns -NFS_RPC_DROP That can happen if duplicate UDP packet arrived, and that's not uncommon. Anyway, we ignore packets with rpc_id lower than last we sent for other requests, so it makes sense to do that for read request as well. Signed-off-by: Vasily Khoruzhick Acked-by: Joe Hershberger --- diff --git a/net/nfs.c b/net/nfs.c index 83ed0a7c37..9a16765ba1 100644 --- a/net/nfs.c +++ b/net/nfs.c @@ -822,6 +822,8 @@ static void nfs_handler(uchar *pkt, unsigned dest, struct in_addr sip, case STATE_READ_REQ: rlen = nfs_read_reply(pkt, len); + if (rlen == -NFS_RPC_DROP) + break; net_set_timeout_handler(nfs_timeout, nfs_timeout_handler); if (rlen > 0) { nfs_offset += rlen;