summaryrefslogtreecommitdiffstats
path: root/fs/afs/rxrpc.c
diff options
context:
space:
mode:
authorDavid Howells2019-05-16 14:21:59 +0200
committerDavid Howells2019-05-16 17:25:20 +0200
commit94f699c9cdb11b8f53cb70624b69aeae16f26db2 (patch)
treef528d331b014f7914518024fb536108ab905cce2 /fs/afs/rxrpc.c
parentrxrpc: Provide kernel interface to set max lifespan on a call (diff)
downloadkernel-qcow2-linux-94f699c9cdb11b8f53cb70624b69aeae16f26db2.tar.gz
kernel-qcow2-linux-94f699c9cdb11b8f53cb70624b69aeae16f26db2.tar.xz
kernel-qcow2-linux-94f699c9cdb11b8f53cb70624b69aeae16f26db2.zip
afs: Fix the maximum lifespan of VL and probe calls
If an older AFS server doesn't support an operation, it may accept the call and then sit on it forever, happily responding to pings that make kafs think that the call is still alive. Fix this by setting the maximum lifespan of Volume Location service calls in particular and probe calls in general so that they don't run on endlessly if they're not supported. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/rxrpc.c')
-rw-r--r--fs/afs/rxrpc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/afs/rxrpc.c b/fs/afs/rxrpc.c
index a34a89c75c6a..4974defb4592 100644
--- a/fs/afs/rxrpc.c
+++ b/fs/afs/rxrpc.c
@@ -426,6 +426,10 @@ void afs_make_call(struct afs_addr_cursor *ac, struct afs_call *call, gfp_t gfp)
call->rxcall = rxcall;
+ if (call->max_lifespan)
+ rxrpc_kernel_set_max_life(call->net->socket, rxcall,
+ call->max_lifespan);
+
/* send the request */
iov[0].iov_base = call->request;
iov[0].iov_len = call->request_size;