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
e76cd24d
Commit
e76cd24d
authored
Apr 09, 2018
by
Christoph Hellwig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net/unix: convert to ->poll_mask
Signed-off-by:
Christoph Hellwig
<
hch@lst.de
>
parent
2c7d3dac
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
19 deletions
+11
-19
net/unix/af_unix.c
net/unix/af_unix.c
+11
-19
No files found.
net/unix/af_unix.c
View file @
e76cd24d
...
@@ -638,9 +638,8 @@ static int unix_stream_connect(struct socket *, struct sockaddr *,
...
@@ -638,9 +638,8 @@ static int unix_stream_connect(struct socket *, struct sockaddr *,
static
int
unix_socketpair
(
struct
socket
*
,
struct
socket
*
);
static
int
unix_socketpair
(
struct
socket
*
,
struct
socket
*
);
static
int
unix_accept
(
struct
socket
*
,
struct
socket
*
,
int
,
bool
);
static
int
unix_accept
(
struct
socket
*
,
struct
socket
*
,
int
,
bool
);
static
int
unix_getname
(
struct
socket
*
,
struct
sockaddr
*
,
int
);
static
int
unix_getname
(
struct
socket
*
,
struct
sockaddr
*
,
int
);
static
__poll_t
unix_poll
(
struct
file
*
,
struct
socket
*
,
poll_table
*
);
static
__poll_t
unix_poll_mask
(
struct
socket
*
,
__poll_t
);
static
__poll_t
unix_dgram_poll
(
struct
file
*
,
struct
socket
*
,
static
__poll_t
unix_dgram_poll_mask
(
struct
socket
*
,
__poll_t
);
poll_table
*
);
static
int
unix_ioctl
(
struct
socket
*
,
unsigned
int
,
unsigned
long
);
static
int
unix_ioctl
(
struct
socket
*
,
unsigned
int
,
unsigned
long
);
static
int
unix_shutdown
(
struct
socket
*
,
int
);
static
int
unix_shutdown
(
struct
socket
*
,
int
);
static
int
unix_stream_sendmsg
(
struct
socket
*
,
struct
msghdr
*
,
size_t
);
static
int
unix_stream_sendmsg
(
struct
socket
*
,
struct
msghdr
*
,
size_t
);
...
@@ -681,7 +680,7 @@ static const struct proto_ops unix_stream_ops = {
...
@@ -681,7 +680,7 @@ static const struct proto_ops unix_stream_ops = {
.
socketpair
=
unix_socketpair
,
.
socketpair
=
unix_socketpair
,
.
accept
=
unix_accept
,
.
accept
=
unix_accept
,
.
getname
=
unix_getname
,
.
getname
=
unix_getname
,
.
poll
=
unix_poll
,
.
poll
_mask
=
unix_poll_mask
,
.
ioctl
=
unix_ioctl
,
.
ioctl
=
unix_ioctl
,
.
listen
=
unix_listen
,
.
listen
=
unix_listen
,
.
shutdown
=
unix_shutdown
,
.
shutdown
=
unix_shutdown
,
...
@@ -704,7 +703,7 @@ static const struct proto_ops unix_dgram_ops = {
...
@@ -704,7 +703,7 @@ static const struct proto_ops unix_dgram_ops = {
.
socketpair
=
unix_socketpair
,
.
socketpair
=
unix_socketpair
,
.
accept
=
sock_no_accept
,
.
accept
=
sock_no_accept
,
.
getname
=
unix_getname
,
.
getname
=
unix_getname
,
.
poll
=
unix_dgram_poll
,
.
poll
_mask
=
unix_dgram_poll_mask
,
.
ioctl
=
unix_ioctl
,
.
ioctl
=
unix_ioctl
,
.
listen
=
sock_no_listen
,
.
listen
=
sock_no_listen
,
.
shutdown
=
unix_shutdown
,
.
shutdown
=
unix_shutdown
,
...
@@ -726,7 +725,7 @@ static const struct proto_ops unix_seqpacket_ops = {
...
@@ -726,7 +725,7 @@ static const struct proto_ops unix_seqpacket_ops = {
.
socketpair
=
unix_socketpair
,
.
socketpair
=
unix_socketpair
,
.
accept
=
unix_accept
,
.
accept
=
unix_accept
,
.
getname
=
unix_getname
,
.
getname
=
unix_getname
,
.
poll
=
unix_dgram_poll
,
.
poll
_mask
=
unix_dgram_poll_mask
,
.
ioctl
=
unix_ioctl
,
.
ioctl
=
unix_ioctl
,
.
listen
=
unix_listen
,
.
listen
=
unix_listen
,
.
shutdown
=
unix_shutdown
,
.
shutdown
=
unix_shutdown
,
...
@@ -2630,13 +2629,10 @@ static int unix_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
...
@@ -2630,13 +2629,10 @@ static int unix_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
return
err
;
return
err
;
}
}
static
__poll_t
unix_poll
(
struct
file
*
file
,
struct
socket
*
sock
,
poll_table
*
wait
)
static
__poll_t
unix_poll
_mask
(
struct
socket
*
sock
,
__poll_t
events
)
{
{
struct
sock
*
sk
=
sock
->
sk
;
struct
sock
*
sk
=
sock
->
sk
;
__poll_t
mask
;
__poll_t
mask
=
0
;
sock_poll_wait
(
file
,
sk_sleep
(
sk
),
wait
);
mask
=
0
;
/* exceptional events? */
/* exceptional events? */
if
(
sk
->
sk_err
)
if
(
sk
->
sk_err
)
...
@@ -2665,15 +2661,11 @@ static __poll_t unix_poll(struct file *file, struct socket *sock, poll_table *wa
...
@@ -2665,15 +2661,11 @@ static __poll_t unix_poll(struct file *file, struct socket *sock, poll_table *wa
return
mask
;
return
mask
;
}
}
static
__poll_t
unix_dgram_poll
(
struct
file
*
file
,
struct
socket
*
sock
,
static
__poll_t
unix_dgram_poll_mask
(
struct
socket
*
sock
,
__poll_t
events
)
poll_table
*
wait
)
{
{
struct
sock
*
sk
=
sock
->
sk
,
*
other
;
struct
sock
*
sk
=
sock
->
sk
,
*
other
;
unsigned
int
writable
;
int
writable
;
__poll_t
mask
;
__poll_t
mask
=
0
;
sock_poll_wait
(
file
,
sk_sleep
(
sk
),
wait
);
mask
=
0
;
/* exceptional events? */
/* exceptional events? */
if
(
sk
->
sk_err
||
!
skb_queue_empty
(
&
sk
->
sk_error_queue
))
if
(
sk
->
sk_err
||
!
skb_queue_empty
(
&
sk
->
sk_error_queue
))
...
@@ -2699,7 +2691,7 @@ static __poll_t unix_dgram_poll(struct file *file, struct socket *sock,
...
@@ -2699,7 +2691,7 @@ static __poll_t unix_dgram_poll(struct file *file, struct socket *sock,
}
}
/* No write status requested, avoid expensive OUT tests. */
/* No write status requested, avoid expensive OUT tests. */
if
(
!
(
poll_requested_events
(
wait
)
&
(
EPOLLWRBAND
|
EPOLLWRNORM
|
EPOLLOUT
)))
if
(
!
(
events
&
(
EPOLLWRBAND
|
EPOLLWRNORM
|
EPOLLOUT
)))
return
mask
;
return
mask
;
writable
=
unix_writable
(
sk
);
writable
=
unix_writable
(
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