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>
This commit is contained in:
David Howells
2017-04-06 10:11:56 +01:00
rodzic faeeb317a5
commit 3a92789af0
10 zmienionych plików z 33 dodań i 33 usunięć

Wyświetl plik

@@ -296,7 +296,7 @@ void rxrpc_peer_error_distributor(struct work_struct *work)
hlist_del_init(&call->error_link);
rxrpc_see_call(call);
if (rxrpc_set_call_completion(call, compl, 0, error))
if (rxrpc_set_call_completion(call, compl, 0, -error))
rxrpc_notify_socket(call);
}