summaryrefslogtreecommitdiff
path: root/net/rxrpc/output.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2016-08-23 17:27:24 +0300
committerDavid Howells <dhowells@redhat.com>2016-08-23 17:27:24 +0300
commitdabe5a790655c79f47d75749874ce7b4d5016de9 (patch)
tree1a2d7aa991caafd82d9dcf750d7741b2d93aff62 /net/rxrpc/output.c
parent26164e77cafbde075397f1df45245be03d8f19b6 (diff)
downloadlinux-dabe5a790655c79f47d75749874ce7b4d5016de9.tar.xz
rxrpc: Tidy up the rxrpc_call struct a bit
Do a little tidying of the rxrpc_call struct: (1) in_clientflag is no longer compared against the value that's in the packet, so keeping it in this form isn't necessary. Use a flag in flags instead and provide a pair of wrapper functions. (2) We don't read the epoch value, so that can go. (3) Move what remains of the data that were used for hashing up in the struct to be with the channel number. (4) Get rid of the local pointer. We can get at this via the socket struct and we only use this in the procfs viewer. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/rxrpc/output.c')
-rw-r--r--net/rxrpc/output.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/rxrpc/output.c b/net/rxrpc/output.c
index f4bda06b7d2d..9e626f1e2668 100644
--- a/net/rxrpc/output.c
+++ b/net/rxrpc/output.c
@@ -218,11 +218,11 @@ int rxrpc_do_sendmsg(struct rxrpc_sock *rx, struct msghdr *msg, size_t len)
ret = 0;
} else if (cmd != RXRPC_CMD_SEND_DATA) {
ret = -EINVAL;
- } else if (!call->in_clientflag &&
+ } else if (rxrpc_is_client_call(call) &&
call->state != RXRPC_CALL_CLIENT_SEND_REQUEST) {
/* request phase complete for this client call */
ret = -EPROTO;
- } else if (call->in_clientflag &&
+ } else if (rxrpc_is_service_call(call) &&
call->state != RXRPC_CALL_SERVER_ACK_REQUEST &&
call->state != RXRPC_CALL_SERVER_SEND_REPLY) {
/* Reply phase not begun or not complete for service call. */