call->lock is no longer necessary, so remove it.
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
unsigned long user_call_ID; /* user-defined call ID */
unsigned long flags;
unsigned long events;
unsigned long user_call_ID; /* user-defined call ID */
unsigned long flags;
unsigned long events;
spinlock_t notify_lock; /* Kernel notification lock */
rwlock_t state_lock; /* lock for state transition */
u32 abort_code; /* Local/remote abort code */
spinlock_t notify_lock; /* Kernel notification lock */
rwlock_t state_lock; /* lock for state transition */
u32 abort_code; /* Local/remote abort code */
unsigned long now = jiffies;
unsigned long ping_at = now + rxrpc_idle_ack_delay;
unsigned long now = jiffies;
unsigned long ping_at = now + rxrpc_idle_ack_delay;
- spin_lock_bh(&call->lock);
-
if (time_before(ping_at, call->ping_at)) {
WRITE_ONCE(call->ping_at, ping_at);
rxrpc_reduce_call_timer(call, ping_at, now,
rxrpc_timer_set_for_ping);
trace_rxrpc_propose_ack(call, why, RXRPC_ACK_PING, serial);
}
if (time_before(ping_at, call->ping_at)) {
WRITE_ONCE(call->ping_at, ping_at);
rxrpc_reduce_call_timer(call, ping_at, now,
rxrpc_timer_set_for_ping);
trace_rxrpc_propose_ack(call, why, RXRPC_ACK_PING, serial);
}
-
- spin_unlock_bh(&call->lock);
}
/*
* Propose a DELAY ACK be sent in the future.
*/
}
/*
* Propose a DELAY ACK be sent in the future.
*/
-static void __rxrpc_propose_delay_ACK(struct rxrpc_call *call,
- rxrpc_serial_t serial,
- enum rxrpc_propose_ack_trace why)
+void rxrpc_propose_delay_ACK(struct rxrpc_call *call, rxrpc_serial_t serial,
+ enum rxrpc_propose_ack_trace why)
{
unsigned long expiry = rxrpc_soft_ack_delay;
unsigned long now = jiffies, ack_at;
{
unsigned long expiry = rxrpc_soft_ack_delay;
unsigned long now = jiffies, ack_at;
trace_rxrpc_propose_ack(call, why, RXRPC_ACK_DELAY, serial);
}
trace_rxrpc_propose_ack(call, why, RXRPC_ACK_DELAY, serial);
}
-/*
- * Propose a DELAY ACK be sent, locking the call structure
- */
-void rxrpc_propose_delay_ACK(struct rxrpc_call *call, rxrpc_serial_t serial,
- enum rxrpc_propose_ack_trace why)
-{
- spin_lock_bh(&call->lock);
- __rxrpc_propose_delay_ACK(call, serial, why);
- spin_unlock_bh(&call->lock);
-}
-
/*
* Queue an ACK for immediate transmission.
*/
/*
* Queue an ACK for immediate transmission.
*/
* retransmitting data.
*/
if (list_empty(&retrans_queue)) {
* retransmitting data.
*/
if (list_empty(&retrans_queue)) {
- spin_lock_bh(&call->lock);
rxrpc_reduce_call_timer(call, resend_at, now_j,
rxrpc_timer_set_for_resend);
rxrpc_reduce_call_timer(call, resend_at, now_j,
rxrpc_timer_set_for_resend);
- spin_unlock_bh(&call->lock);
ack_ts = ktime_sub(now, call->acks_latest_ts);
if (ktime_to_us(ack_ts) < (call->peer->srtt_us >> 3))
goto out;
ack_ts = ktime_sub(now, call->acks_latest_ts);
if (ktime_to_us(ack_ts) < (call->peer->srtt_us >> 3))
goto out;
skb_queue_head_init(&call->recvmsg_queue);
skb_queue_head_init(&call->rx_oos_queue);
init_waitqueue_head(&call->waitq);
skb_queue_head_init(&call->recvmsg_queue);
skb_queue_head_init(&call->rx_oos_queue);
init_waitqueue_head(&call->waitq);
- spin_lock_init(&call->lock);
spin_lock_init(&call->notify_lock);
spin_lock_init(&call->tx_lock);
spin_lock_init(&call->input_lock);
spin_lock_init(&call->notify_lock);
spin_lock_init(&call->tx_lock);
spin_lock_init(&call->input_lock);
ASSERTCMP(call->state, ==, RXRPC_CALL_COMPLETE);
ASSERTCMP(call->state, ==, RXRPC_CALL_COMPLETE);
- spin_lock_bh(&call->lock);
if (test_and_set_bit(RXRPC_CALL_RELEASED, &call->flags))
BUG();
if (test_and_set_bit(RXRPC_CALL_RELEASED, &call->flags))
BUG();
- spin_unlock_bh(&call->lock);
rxrpc_put_call_slot(call);
rxrpc_delete_call_timer(call);
rxrpc_put_call_slot(call);
rxrpc_delete_call_timer(call);
rxrpc_seq_t top = READ_ONCE(call->tx_top);
if (call->ackr_reason) {
rxrpc_seq_t top = READ_ONCE(call->tx_top);
if (call->ackr_reason) {
- spin_lock_bh(&call->lock);
- call->ackr_reason = 0;
- spin_unlock_bh(&call->lock);
now = jiffies;
timo = now + MAX_JIFFY_OFFSET;
WRITE_ONCE(call->resend_at, timo);
now = jiffies;
timo = now + MAX_JIFFY_OFFSET;
WRITE_ONCE(call->resend_at, timo);
if (txb->ack.reason == RXRPC_ACK_IDLE)
clear_bit(RXRPC_CALL_IDLE_ACK_PENDING, &call->flags);
if (txb->ack.reason == RXRPC_ACK_IDLE)
clear_bit(RXRPC_CALL_IDLE_ACK_PENDING, &call->flags);
- spin_lock_bh(&call->lock);
n = rxrpc_fill_out_ack(conn, call, txb);
n = rxrpc_fill_out_ack(conn, call, txb);
- spin_unlock_bh(&call->lock);
- if (n == 0) {
- kfree(pkt);
iov[0].iov_base = &txb->wire;
iov[0].iov_len = sizeof(txb->wire) + sizeof(txb->ack) + n;
iov[0].iov_base = &txb->wire;
iov[0].iov_len = sizeof(txb->wire) + sizeof(txb->ack) + n;