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
nexedi
linux
Commits
dd67081b
Commit
dd67081b
authored
Dec 31, 2017
by
Christoph Hellwig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pipe: convert to ->poll_mask
Signed-off-by:
Christoph Hellwig
<
hch@lst.de
>
parent
b28fc822
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
fs/pipe.c
fs/pipe.c
+13
-9
No files found.
fs/pipe.c
View file @
dd67081b
...
...
@@ -509,19 +509,22 @@ static long pipe_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
}
}
/* No kernel lock held - fine */
static
__poll_t
pipe_poll
(
struct
file
*
filp
,
poll_table
*
wait
)
static
struct
wait_queue_head
*
pipe_get_poll_head
(
struct
file
*
filp
,
__poll_t
events
)
{
__poll_t
mask
;
struct
pipe_inode_info
*
pipe
=
filp
->
private_data
;
int
nrbufs
;
poll_wait
(
filp
,
&
pipe
->
wait
,
wait
);
return
&
pipe
->
wait
;
}
/* No kernel lock held - fine */
static
__poll_t
pipe_poll_mask
(
struct
file
*
filp
,
__poll_t
events
)
{
struct
pipe_inode_info
*
pipe
=
filp
->
private_data
;
int
nrbufs
=
pipe
->
nrbufs
;
__poll_t
mask
=
0
;
/* Reading only -- no need for acquiring the semaphore. */
nrbufs
=
pipe
->
nrbufs
;
mask
=
0
;
if
(
filp
->
f_mode
&
FMODE_READ
)
{
mask
=
(
nrbufs
>
0
)
?
EPOLLIN
|
EPOLLRDNORM
:
0
;
if
(
!
pipe
->
writers
&&
filp
->
f_version
!=
pipe
->
w_counter
)
...
...
@@ -1020,7 +1023,8 @@ const struct file_operations pipefifo_fops = {
.
llseek
=
no_llseek
,
.
read_iter
=
pipe_read
,
.
write_iter
=
pipe_write
,
.
poll
=
pipe_poll
,
.
get_poll_head
=
pipe_get_poll_head
,
.
poll_mask
=
pipe_poll_mask
,
.
unlocked_ioctl
=
pipe_ioctl
,
.
release
=
pipe_release
,
.
fasync
=
pipe_fasync
,
...
...
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