From f780c8ea0e73c0d371ffbebff91bb7555697219f Mon Sep 17 00:00:00 2001 From: David Howells Date: Thu, 2 Nov 2017 15:27:48 +0000 Subject: afs: Consolidate abort_to_error translators The AFS abort code space is shared across all services, so there's no need for separate abort_to_error translators for each service. Consolidate them into a single function and remove the function pointers for them. Signed-off-by: David Howells --- fs/afs/rxrpc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'fs/afs/rxrpc.c') diff --git a/fs/afs/rxrpc.c b/fs/afs/rxrpc.c index 5d2c1a34ffd5..5f06cf720340 100644 --- a/fs/afs/rxrpc.c +++ b/fs/afs/rxrpc.c @@ -31,7 +31,6 @@ static int afs_deliver_cm_op_id(struct afs_call *); static const struct afs_call_type afs_RXCMxxxx = { .name = "CB.xxxx", .deliver = afs_deliver_cm_op_id, - .abort_to_error = afs_abort_to_error, }; /* @@ -418,7 +417,7 @@ error_do_abort: rxrpc_kernel_recv_data(call->net->socket, rxcall, NULL, 0, &offset, false, &abort_code, &call->service_id); - ret = call->type->abort_to_error(abort_code); + ret = afs_abort_to_error(abort_code); } error_kill_call: afs_put_call(call); @@ -876,7 +875,7 @@ int afs_extract_data(struct afs_call *call, void *buf, size_t count, } if (ret == -ECONNABORTED) - call->error = call->type->abort_to_error(call->abort_code); + call->error = afs_abort_to_error(call->abort_code); else call->error = ret; call->state = AFS_CALL_COMPLETE; -- cgit