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
3e93a357
Commit
3e93a357
authored
May 24, 2022
by
Jens Axboe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
io_uring: convert epoll to io_cmd_type
Signed-off-by:
Jens Axboe
<
axboe@kernel.dk
>
parent
bb040a21
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
io_uring/io_uring.c
io_uring/io_uring.c
+8
-7
No files found.
io_uring/io_uring.c
View file @
3e93a357
...
...
@@ -980,7 +980,6 @@ struct io_kiocb {
struct
file
*
file
;
struct
io_cmd_data
cmd
;
struct
io_rsrc_update
rsrc_update
;
struct
io_epoll
epoll
;
struct
io_splice
splice
;
struct
io_provide_buf
pbuf
;
struct
io_msg
msg
;
...
...
@@ -5577,18 +5576,20 @@ static int io_epoll_ctl_prep(struct io_kiocb *req,
const
struct
io_uring_sqe
*
sqe
)
{
#if defined(CONFIG_EPOLL)
struct
io_epoll
*
epoll
=
io_kiocb_to_cmd
(
req
);
if
(
sqe
->
buf_index
||
sqe
->
splice_fd_in
)
return
-
EINVAL
;
req
->
epoll
.
epfd
=
READ_ONCE
(
sqe
->
fd
);
req
->
epoll
.
op
=
READ_ONCE
(
sqe
->
len
);
req
->
epoll
.
fd
=
READ_ONCE
(
sqe
->
off
);
epoll
->
epfd
=
READ_ONCE
(
sqe
->
fd
);
epoll
->
op
=
READ_ONCE
(
sqe
->
len
);
epoll
->
fd
=
READ_ONCE
(
sqe
->
off
);
if
(
ep_op_has_event
(
req
->
epoll
.
op
))
{
if
(
ep_op_has_event
(
epoll
->
op
))
{
struct
epoll_event
__user
*
ev
;
ev
=
u64_to_user_ptr
(
READ_ONCE
(
sqe
->
addr
));
if
(
copy_from_user
(
&
req
->
epoll
.
event
,
ev
,
sizeof
(
*
ev
)))
if
(
copy_from_user
(
&
epoll
->
event
,
ev
,
sizeof
(
*
ev
)))
return
-
EFAULT
;
}
...
...
@@ -5601,7 +5602,7 @@ static int io_epoll_ctl_prep(struct io_kiocb *req,
static
int
io_epoll_ctl
(
struct
io_kiocb
*
req
,
unsigned
int
issue_flags
)
{
#if defined(CONFIG_EPOLL)
struct
io_epoll
*
ie
=
&
req
->
epoll
;
struct
io_epoll
*
ie
=
io_kiocb_to_cmd
(
req
)
;
int
ret
;
bool
force_nonblock
=
issue_flags
&
IO_URING_F_NONBLOCK
;
...
...
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