9
0
Fork 0

nfs: skip over stale rpc packets

When a former transaction was aborted by hitting Ctrl-C the old reply might
still hang in the ethernet controller making all further transactions fail.

So just skip over old replies.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Uwe Kleine-König 2014-02-07 22:28:05 +01:00 committed by Sascha Hauer
parent e674513448
commit f91c16b8e2
1 changed files with 6 additions and 1 deletions

View File

@ -275,8 +275,13 @@ static int rpc_check_reply(unsigned char *pkt, int rpc_prog, unsigned long rpc_i
memcpy(&rpc, pkt, sizeof(rpc));
if (ntohl(rpc.id) != rpc_id)
if (ntohl(rpc.id) != rpc_id) {
if (rpc_id - ntohl(rpc.id) == 1)
/* stale packet, wait a bit longer */
return 0;
return -EINVAL;
}
if (rpc.rstatus ||
rpc.verifier ||