Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
f130c141
Commit
f130c141
authored
Feb 23, 2003
by
James Morris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NETLINK]: Un-duplicate rcv wakeup logic.
parent
7a4ab349
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
net/netlink/af_netlink.c
net/netlink/af_netlink.c
+12
-9
No files found.
net/netlink/af_netlink.c
View file @
f130c141
...
...
@@ -585,6 +585,16 @@ void netlink_set_err(struct sock *ssk, u32 pid, u32 group, int code)
read_unlock
(
&
nl_table_lock
);
}
static
inline
void
netlink_rcv_wake
(
struct
sock
*
sk
)
{
struct
netlink_opt
*
nlk
=
nlk_sk
(
sk
);
if
(
skb_queue_len
(
&
sk
->
receive_queue
)
==
0
)
clear_bit
(
0
,
&
nlk
->
state
);
if
(
!
test_bit
(
0
,
&
nlk
->
state
))
wake_up_interruptible
(
&
nlk
->
wait
);
}
static
int
netlink_sendmsg
(
struct
kiocb
*
iocb
,
struct
socket
*
sock
,
struct
msghdr
*
msg
,
int
len
,
struct
scm_cookie
*
scm
)
...
...
@@ -706,10 +716,7 @@ static int netlink_recvmsg(struct kiocb *iocb, struct socket *sock,
netlink_dump
(
sk
);
out:
if
(
skb_queue_len
(
&
sk
->
receive_queue
)
==
0
)
clear_bit
(
0
,
&
nlk
->
state
);
if
(
!
test_bit
(
0
,
&
nlk
->
state
))
wake_up_interruptible
(
&
nlk
->
wait
);
netlink_rcv_wake
(
sk
);
return
err
?
:
copied
;
}
...
...
@@ -719,11 +726,7 @@ void netlink_data_ready(struct sock *sk, int len)
if
(
nlk
->
data_ready
)
nlk
->
data_ready
(
sk
,
len
);
if
(
skb_queue_len
(
&
sk
->
receive_queue
)
==
0
)
clear_bit
(
0
,
&
nlk
->
state
);
if
(
!
test_bit
(
0
,
&
nlk
->
state
))
wake_up_interruptible
(
&
nlk
->
wait
);
netlink_rcv_wake
(
sk
);
}
/*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment