From: Ursula Braun Date: Mon, 19 Dec 2011 22:56:28 +0000 (+0000) Subject: af_iucv: accelerate close for HS transport X-Git-Tag: v3.12-rc1~4160^2~156 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=42bd48e0145567acf7b3d2ae48bea765315bdd89;p=kernel%2Fkernel-generic.git 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 Signed-off-by: Frank Blaschka Signed-off-by: David S. Miller --- diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c index f4ad720..32a5010 100644 --- a/net/iucv/af_iucv.c +++ b/net/iucv/af_iucv.c @@ -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); }