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:
parent
e674513448
commit
f91c16b8e2
7
fs/nfs.c
7
fs/nfs.c
|
@ -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 ||
|
||||
|
|
Loading…
Reference in New Issue