]> git.baikalelectronics.ru Git - kernel.git/commit
afs: Fix missing timeout reset
authorDavid Howells <dhowells@redhat.com>
Tue, 19 Nov 2019 21:00:36 +0000 (21:00 +0000)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 19 Nov 2019 22:36:38 +0000 (14:36 -0800)
commitc90b89e5be0dfe7726e6594a87c404eccda3d736
tree97ba35745fa3584d8a6d29c7dd13e5dd9a487ea9
parent1dfd6f67478c903ae0231c62c07e90f3fe01a131
afs: Fix missing timeout reset

In afs_wait_for_call_to_complete(), rather than immediately aborting an
operation if a signal occurs, the code attempts to wait for it to
complete, using a schedule timeout of 2*RTT (or min 2 jiffies) and a
check that we're still receiving relevant packets from the server before
we consider aborting the call.  We may even ping the server to check on
the status of the call.

However, there's a missing timeout reset in the event that we do
actually get a packet to process, such that if we then get a couple of
short stalls, we then time out when progress is actually being made.

Fix this by resetting the timeout any time we get something to process.
If it's the failure of the call then the call state will get changed and
we'll exit the loop shortly thereafter.

A symptom of this is data fetches and stores failing with EINTR when
they really shouldn't.

Fixes: 8d0c6fe295af ("rxrpc: Use MSG_WAITALL to tell sendmsg() to temporarily ignore signals")
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Marc Dionne <marc.dionne@auristor.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/afs/rxrpc.c