diff options
author | David Howells <dhowells@redhat.com> | 2017-04-06 10:11:56 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2017-04-06 10:11:56 +0100 |
commit | 3a92789af0d625caff1e0bf5701aec8edf0d057d (patch) | |
tree | 8ad074e2048b742c7c4e8aebfbb3aeadc552a525 /net/rxrpc/input.c | |
parent | faeeb317a5615076dff1ff44b51e862e6064dbd0 (diff) | |
download | op-kernel-dev-3a92789af0d625caff1e0bf5701aec8edf0d057d.zip op-kernel-dev-3a92789af0d625caff1e0bf5701aec8edf0d057d.tar.gz |
rxrpc: Use negative error codes in rxrpc_call struct
Use negative error codes in struct rxrpc_call::error because that's what
the kernel normally deals with and to make the code consistent. We only
turn them positive when transcribing into a cmsg for userspace recvmsg.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/rxrpc/input.c')
-rw-r--r-- | net/rxrpc/input.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c index 18b2ad8..3a7754c 100644 --- a/net/rxrpc/input.c +++ b/net/rxrpc/input.c @@ -30,7 +30,7 @@ static void rxrpc_proto_abort(const char *why, struct rxrpc_call *call, rxrpc_seq_t seq) { - if (rxrpc_abort_call(why, call, seq, RX_PROTOCOL_ERROR, EBADMSG)) { + if (rxrpc_abort_call(why, call, seq, RX_PROTOCOL_ERROR, -EBADMSG)) { set_bit(RXRPC_CALL_EV_ABORT, &call->events); rxrpc_queue_call(call); } @@ -895,7 +895,7 @@ static void rxrpc_input_abort(struct rxrpc_call *call, struct sk_buff *skb) _proto("Rx ABORT %%%u { %x }", sp->hdr.serial, abort_code); if (rxrpc_set_call_completion(call, RXRPC_CALL_REMOTELY_ABORTED, - abort_code, ECONNABORTED)) + abort_code, -ECONNABORTED)) rxrpc_notify_socket(call); } @@ -958,7 +958,7 @@ static void rxrpc_input_implicit_end_call(struct rxrpc_connection *conn, case RXRPC_CALL_COMPLETE: break; default: - if (rxrpc_abort_call("IMP", call, 0, RX_CALL_DEAD, ESHUTDOWN)) { + if (rxrpc_abort_call("IMP", call, 0, RX_CALL_DEAD, -ESHUTDOWN)) { set_bit(RXRPC_CALL_EV_ABORT, &call->events); rxrpc_queue_call(call); } |