diff options
author | David Howells <dhowells@redhat.com> | 2022-10-17 11:44:22 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2023-01-31 16:38:26 +0000 |
commit | 5bbf953382bec6d3b7003e9389668c1d0863db31 (patch) | |
tree | c7e55b8e988b8db8d183cc4469483f677078b05f /net/rxrpc/recvmsg.c | |
parent | 84e28aa513af814807a5e9a0e5f3cab773946f3c (diff) | |
download | lwn-5bbf953382bec6d3b7003e9389668c1d0863db31.tar.gz lwn-5bbf953382bec6d3b7003e9389668c1d0863db31.zip |
rxrpc: De-atomic call->ackr_window and call->ackr_nr_unacked
call->ackr_window doesn't need to be atomic as ACK generation and ACK
transmission are now done in the same thread, so drop the atomic64 handling
and split it into two separate members.
Similarly, call->ackr_nr_unacked doesn't need to be atomic now either.
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Diffstat (limited to 'net/rxrpc/recvmsg.c')
-rw-r--r-- | net/rxrpc/recvmsg.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/rxrpc/recvmsg.c b/net/rxrpc/recvmsg.c index b7545fdc0401..50d263a6359d 100644 --- a/net/rxrpc/recvmsg.c +++ b/net/rxrpc/recvmsg.c @@ -95,7 +95,7 @@ static int rxrpc_recvmsg_term(struct rxrpc_call *call, struct msghdr *msg) } trace_rxrpc_recvdata(call, rxrpc_recvmsg_terminal, - lower_32_bits(atomic64_read(&call->ackr_window)) - 1, + call->ackr_window - 1, call->rx_pkt_offset, call->rx_pkt_len, ret); return ret; } @@ -175,13 +175,13 @@ static int rxrpc_recvmsg_data(struct socket *sock, struct rxrpc_call *call, rx_pkt_len = call->rx_pkt_len; if (rxrpc_call_has_failed(call)) { - seq = lower_32_bits(atomic64_read(&call->ackr_window)) - 1; + seq = call->ackr_window - 1; ret = -EIO; goto done; } if (test_bit(RXRPC_CALL_RECVMSG_READ_ALL, &call->flags)) { - seq = lower_32_bits(atomic64_read(&call->ackr_window)) - 1; + seq = call->ackr_window - 1; ret = 1; goto done; } |