diff options
author | David Howells <dhowells@redhat.com> | 2020-03-13 12:22:09 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-04-17 11:49:57 +0300 |
commit | f96f2c885eda81f28a0a51d2adf06ff3a0374d79 (patch) | |
tree | e97049a30ebe1e90e6a273a28c0ec34c87606b63 /fs/afs | |
parent | f8da7f4428613c27ff31c75e3bc58589fa432e3b (diff) | |
download | linux-f96f2c885eda81f28a0a51d2adf06ff3a0374d79.tar.xz |
rxrpc: Fix call interruptibility handling
[ Upstream commit e138aa7d3271ac1b0690ae2c9b04d51468dce1d6 ]
Fix the interruptibility of kernel-initiated client calls so that they're
either only interruptible when they're waiting for a call slot to come
available or they're not interruptible at all. Either way, they're not
interruptible during transmission.
This should help prevent StoreData calls from being interrupted when
writeback is in progress. It doesn't, however, handle interruption during
the receive phase.
Userspace-initiated calls are still interruptable. After the signal has
been handled, sendmsg() will return the amount of data copied out of the
buffer and userspace can perform another sendmsg() call to continue
transmission.
Fixes: bc5e3a546d55 ("rxrpc: Use MSG_WAITALL to tell sendmsg() to temporarily ignore signals")
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/afs')
-rw-r--r-- | fs/afs/rxrpc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/afs/rxrpc.c b/fs/afs/rxrpc.c index ef1d09f8920b..52aa90fb4fbd 100644 --- a/fs/afs/rxrpc.c +++ b/fs/afs/rxrpc.c @@ -414,7 +414,8 @@ void afs_make_call(struct afs_addr_cursor *ac, struct afs_call *call, gfp_t gfp) afs_wake_up_async_call : afs_wake_up_call_waiter), call->upgrade, - call->intr, + (call->intr ? RXRPC_PREINTERRUPTIBLE : + RXRPC_UNINTERRUPTIBLE), call->debug_id); if (IS_ERR(rxcall)) { ret = PTR_ERR(rxcall); |