Commit 42bd48e0145567acf7b3d2ae48bea765315bdd89

Authored by Ursula Braun
Committed by David S. Miller
1 parent c64d3f8f59

af_iucv: accelerate close for HS transport

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 <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 7 additions and 0 deletions Side-by-side Diff

... ... @@ -2293,6 +2293,13 @@
2293 2293 }
2294 2294 spin_unlock_irqrestore(&list->lock, flags);
2295 2295  
  2296 + if (sk->sk_state == IUCV_CLOSING) {
  2297 + if (skb_queue_empty(&iucv_sk(sk)->send_skb_q)) {
  2298 + sk->sk_state = IUCV_CLOSED;
  2299 + sk->sk_state_change(sk);
  2300 + }
  2301 + }
  2302 +
2296 2303 out_unlock:
2297 2304 bh_unlock_sock(sk);
2298 2305 }