summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2009-05-08 06:30:25 +0000
committerDavid S. Miller <davem@davemloft.net>2009-05-09 13:15:47 -0700
commit9948bb6a6db6ad6a8bf2ccaaceb780404f1f43df (patch)
treeb4b5d05a0561d669f0d59b5e0cdc26bf9c6284fd /net
parent23b6cc425d718fce2501d5f60e368cfa44ef7d86 (diff)
downloadlinux-9948bb6a6db6ad6a8bf2ccaaceb780404f1f43df.tar.gz
linux-9948bb6a6db6ad6a8bf2ccaaceb780404f1f43df.tar.bz2
linux-9948bb6a6db6ad6a8bf2ccaaceb780404f1f43df.zip
decnet: Use data ready call back, rather than hand coding it
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-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:
static __inline__ int dn_queue_skb(struct sock *sk, struct sk_buff *skb, int sig, struct sk_buff_head *queue)
{
int err;
+ int skb_len;
/* Cast skb->rcvbuf to unsigned... It's pointless, but reduces
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
if (err)
goto out;
+ skb_len = skb->len;
skb_set_owner_r(skb, sk);
skb_queue_tail(queue, skb);
- /* This code only runs from BH or BH protected context.
- * Therefore the plain read_lock is ok here. -DaveM
- */
- read_lock(&sk->sk_callback_lock);
- if (!sock_flag(sk, SOCK_DEAD)) {
- struct socket *sock = sk->sk_socket;
- wake_up_interruptible(sk->sk_sleep);
- if (sock && sock->fasync_list &&
- !test_bit(SOCK_ASYNC_WAITDATA, &sock->flags))
- __kill_fasync(sock->fasync_list, sig,
- (sig == SIGURG) ? POLL_PRI : POLL_IN);
- }
- read_unlock(&sk->sk_callback_lock);
+ if (!sock_flag(sk, SOCK_DEAD))
+ sk->sk_data_ready(sk, skb_len);
out:
return err;
}