Skip to content

Commit c74386d

Browse files
dhowellstorvalds
authored andcommitted
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: bc5e3a5 ("rxrpc: Use MSG_WAITALL to tell sendmsg() to temporarily ignore signals") Signed-off-by: David Howells <[email protected]> Reviewed-by: Marc Dionne <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent fd8f64d commit c74386d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/afs/rxrpc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,7 @@ long afs_wait_for_call_to_complete(struct afs_call *call,
637637
call->need_attention = false;
638638
__set_current_state(TASK_RUNNING);
639639
afs_deliver_to_call(call);
640+
timeout = rtt2;
640641
continue;
641642
}
642643

0 commit comments

Comments
 (0)