summaryrefslogtreecommitdiffstats
path: root/net/rxrpc/conn_object.c
diff options
context:
space:
mode:
authorDavid Howells2016-08-30 10:49:28 +0200
committerDavid Howells2016-08-30 16:58:31 +0200
commitf5c17aaeb2aee9b6c30d082bbe652a7e5589adff (patch)
treebc2ec0c32190f3a2de5e1d322d745232ff96771b /net/rxrpc/conn_object.c
parentrxrpc: Fix a potential NULL-pointer deref in rxrpc_abort_calls (diff)
downloadkernel-qcow2-linux-f5c17aaeb2aee9b6c30d082bbe652a7e5589adff.tar.gz
kernel-qcow2-linux-f5c17aaeb2aee9b6c30d082bbe652a7e5589adff.tar.xz
kernel-qcow2-linux-f5c17aaeb2aee9b6c30d082bbe652a7e5589adff.zip
rxrpc: Calls should only have one terminal state
Condense the terminal states of a call state machine to a single state, plus a separate completion type value. The value is then set, along with error and abort code values, only when the call is transitioned to the completion state. Helpers are provided to simplify this. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/rxrpc/conn_object.c')
-rw-r--r--net/rxrpc/conn_object.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/rxrpc/conn_object.c b/net/rxrpc/conn_object.c
index 5b45b6c367e7..9c6685b97e70 100644
--- a/net/rxrpc/conn_object.c
+++ b/net/rxrpc/conn_object.c
@@ -165,8 +165,8 @@ void __rxrpc_disconnect_call(struct rxrpc_connection *conn,
* through the channel, whilst disposing of the actual call record.
*/
chan->last_service_id = call->service_id;
- if (call->local_abort) {
- chan->last_abort = call->local_abort;
+ if (call->abort_code) {
+ chan->last_abort = call->abort_code;
chan->last_type = RXRPC_PACKET_TYPE_ABORT;
} else {
chan->last_seq = call->rx_data_eaten;