mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 02:00:53 +07:00
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>
This commit is contained in:
parent
23b6cc425d
commit
9948bb6a6d
@ -578,6 +578,7 @@ static void dn_nsp_linkservice(struct sock *sk, struct sk_buff *skb)
|
|||||||
static __inline__ int dn_queue_skb(struct sock *sk, struct sk_buff *skb, int sig, struct sk_buff_head *queue)
|
static __inline__ int dn_queue_skb(struct sock *sk, struct sk_buff *skb, int sig, struct sk_buff_head *queue)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
int skb_len;
|
||||||
|
|
||||||
/* Cast skb->rcvbuf to unsigned... It's pointless, but reduces
|
/* Cast skb->rcvbuf to unsigned... It's pointless, but reduces
|
||||||
number of warnings when compiling with -W --ANK
|
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)
|
if (err)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
skb_len = skb->len;
|
||||||
skb_set_owner_r(skb, sk);
|
skb_set_owner_r(skb, sk);
|
||||||
skb_queue_tail(queue, skb);
|
skb_queue_tail(queue, skb);
|
||||||
|
|
||||||
/* This code only runs from BH or BH protected context.
|
if (!sock_flag(sk, SOCK_DEAD))
|
||||||
* Therefore the plain read_lock is ok here. -DaveM
|
sk->sk_data_ready(sk, skb_len);
|
||||||
*/
|
|
||||||
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);
|
|
||||||
out:
|
out:
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user