Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

io_uring: convert epoll to io_cmd_type

Signed-off-by: Jens Axboe <axboe@kernel.dk>

+8 -7
+8 -7
io_uring/io_uring.c
··· 980 980 struct file *file; 981 981 struct io_cmd_data cmd; 982 982 struct io_rsrc_update rsrc_update; 983 - struct io_epoll epoll; 984 983 struct io_splice splice; 985 984 struct io_provide_buf pbuf; 986 985 struct io_msg msg; ··· 5576 5577 const struct io_uring_sqe *sqe) 5577 5578 { 5578 5579 #if defined(CONFIG_EPOLL) 5580 + struct io_epoll *epoll = io_kiocb_to_cmd(req); 5581 + 5579 5582 if (sqe->buf_index || sqe->splice_fd_in) 5580 5583 return -EINVAL; 5581 5584 5582 - req->epoll.epfd = READ_ONCE(sqe->fd); 5583 - req->epoll.op = READ_ONCE(sqe->len); 5584 - req->epoll.fd = READ_ONCE(sqe->off); 5585 + epoll->epfd = READ_ONCE(sqe->fd); 5586 + epoll->op = READ_ONCE(sqe->len); 5587 + epoll->fd = READ_ONCE(sqe->off); 5585 5588 5586 - if (ep_op_has_event(req->epoll.op)) { 5589 + if (ep_op_has_event(epoll->op)) { 5587 5590 struct epoll_event __user *ev; 5588 5591 5589 5592 ev = u64_to_user_ptr(READ_ONCE(sqe->addr)); 5590 - if (copy_from_user(&req->epoll.event, ev, sizeof(*ev))) 5593 + if (copy_from_user(&epoll->event, ev, sizeof(*ev))) 5591 5594 return -EFAULT; 5592 5595 } 5593 5596 ··· 5602 5601 static int io_epoll_ctl(struct io_kiocb *req, unsigned int issue_flags) 5603 5602 { 5604 5603 #if defined(CONFIG_EPOLL) 5605 - struct io_epoll *ie = &req->epoll; 5604 + struct io_epoll *ie = io_kiocb_to_cmd(req); 5606 5605 int ret; 5607 5606 bool force_nonblock = issue_flags & IO_URING_F_NONBLOCK; 5608 5607