diff options
author | David Howells <dhowells@redhat.com> | 2017-04-06 11:11:56 +0200 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2017-04-06 11:11:56 +0200 |
commit | 3a92789af0d625caff1e0bf5701aec8edf0d057d (patch) | |
tree | 8ad074e2048b742c7c4e8aebfbb3aeadc552a525 /net/rxrpc/call_accept.c | |
parent | bonding: attempt to better support longer hw addresses (diff) | |
download | linux-3a92789af0d625caff1e0bf5701aec8edf0d057d.tar.xz linux-3a92789af0d625caff1e0bf5701aec8edf0d057d.zip |
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/call_accept.c')
-rw-r--r-- | net/rxrpc/call_accept.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/rxrpc/call_accept.c b/net/rxrpc/call_accept.c index 0ed181f53f32..1752fcf8e8f1 100644 --- a/net/rxrpc/call_accept.c +++ b/net/rxrpc/call_accept.c @@ -413,11 +413,11 @@ found_service: case RXRPC_CONN_REMOTELY_ABORTED: rxrpc_set_call_completion(call, RXRPC_CALL_REMOTELY_ABORTED, - conn->remote_abort, ECONNABORTED); + conn->remote_abort, -ECONNABORTED); break; case RXRPC_CONN_LOCALLY_ABORTED: rxrpc_abort_call("CON", call, sp->hdr.seq, - conn->local_abort, ECONNABORTED); + conn->local_abort, -ECONNABORTED); break; default: BUG(); @@ -600,7 +600,7 @@ int rxrpc_reject_call(struct rxrpc_sock *rx) write_lock_bh(&call->state_lock); switch (call->state) { case RXRPC_CALL_SERVER_ACCEPTING: - __rxrpc_abort_call("REJ", call, 1, RX_USER_ABORT, ECONNABORTED); + __rxrpc_abort_call("REJ", call, 1, RX_USER_ABORT, -ECONNABORTED); abort = true; /* fall through */ case RXRPC_CALL_COMPLETE: |