aboutsummaryrefslogtreecommitdiffstats
path: root/net/decnet
diff options
context:
space:
mode:
Diffstat (limited to 'net/decnet')
-rw-r--r--net/decnet/dn_nsp_in.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/net/decnet/dn_nsp_in.c b/net/decnet/dn_nsp_in.c
index 5d8a2a56fd39..932408dca86d 100644
--- a/net/decnet/dn_nsp_in.c
+++ b/net/decnet/dn_nsp_in.c
@@ -578,6 +578,7 @@ out:
578static __inline__ int dn_queue_skb(struct sock *sk, struct sk_buff *skb, int sig, struct sk_buff_head *queue) 578static __inline__ int dn_queue_skb(struct sock *sk, struct sk_buff *skb, int sig, struct sk_buff_head *queue)
579{ 579{
580 int err; 580 int err;
581 int skb_len;
581 582
582 /* Cast skb->rcvbuf to unsigned... It's pointless, but reduces 583 /* Cast skb->rcvbuf to unsigned... It's pointless, but reduces
583 number of warnings when compiling with -W --ANK 584 number of warnings when compiling with -W --ANK
@@ -592,22 +593,12 @@ static __inline__ int dn_queue_skb(struct sock *sk, struct sk_buff *skb, int sig
592 if (err) 593 if (err)
593 goto out; 594 goto out;
594 595
596 skb_len = skb->len;
595 skb_set_owner_r(skb, sk); 597 skb_set_owner_r(skb, sk);
596 skb_queue_tail(queue, skb); 598 skb_queue_tail(queue, skb);
597 599
598 /* This code only runs from BH or BH protected context. 600 if (!sock_flag(sk, SOCK_DEAD))
599 * Therefore the plain read_lock is ok here. -DaveM 601 sk->sk_data_ready(sk, skb_len);
600 */
601 read_lock(&sk->sk_callback_lock);
602 if (!sock_flag(sk, SOCK_DEAD)) {
603 struct socket *sock = sk->sk_socket;
604 wake_up_interruptible(sk->sk_sleep);
605 if (sock && sock->fasync_list &&
606 !test_bit(SOCK_ASYNC_WAITDATA, &sock->flags))
607 __kill_fasync(sock->fasync_list, sig,
608 (sig == SIGURG) ? POLL_PRI : POLL_IN);
609 }
610 read_unlock(&sk->sk_callback_lock);
611out: 602out:
612 return err; 603 return err;
613} 604}