Skip to content

Commit

Permalink
af_iucv: accelerate close for HS transport
Browse files Browse the repository at this point in the history
Closing an af_iucv socket may wait for confirmation of outstanding
send requests. This patch adds confirmation code for the new
HiperSockets transport.

Signed-off-by: Ursula Braun <[email protected]>
Signed-off-by: Frank Blaschka <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
braunu authored and davem330 committed Dec 20, 2011
1 parent c64d3f8 commit 42bd48e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions net/iucv/af_iucv.c
Original file line number Diff line number Diff line change
Expand Up @@ -2293,6 +2293,13 @@ static void afiucv_hs_callback_txnotify(struct sk_buff *skb,
}
spin_unlock_irqrestore(&list->lock, flags);

if (sk->sk_state == IUCV_CLOSING) {
if (skb_queue_empty(&iucv_sk(sk)->send_skb_q)) {
sk->sk_state = IUCV_CLOSED;
sk->sk_state_change(sk);
}
}

out_unlock:
bh_unlock_sock(sk);
}
Expand Down

0 comments on commit 42bd48e

Please sign in to comment.