]> git.baikalelectronics.ru Git - kernel.git/commitdiff
io_uring: consistently use the EPOLL* defines
authorChristoph Hellwig <hch@lst.de>
Wed, 18 May 2022 08:40:04 +0000 (10:40 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 18 May 2022 12:19:05 +0000 (06:19 -0600)
POLL* are unannotated values for the userspace ABI, while everything
in-kernel should use EPOLL* and the __poll_t type.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20220518084005.3255380-6-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c

index c4214bfc7039550cdfc69c4d90cf3511020d146f..e24eb20f7e30717f2eab6faf986e52c6c2aa01d2 100644 (file)
@@ -6332,7 +6332,7 @@ static void io_poll_cancel_req(struct io_kiocb *req)
 
 #define wqe_to_req(wait)       ((void *)((unsigned long) (wait)->private & ~1))
 #define wqe_is_double(wait)    ((unsigned long) (wait)->private & 1)
-#define IO_ASYNC_POLL_COMMON   (EPOLLONESHOT | POLLPRI)
+#define IO_ASYNC_POLL_COMMON   (EPOLLONESHOT | EPOLLPRI)
 
 static int io_poll_wake(struct wait_queue_entry *wait, unsigned mode, int sync,
                        void *key)
@@ -6537,14 +6537,14 @@ static int io_arm_poll_handler(struct io_kiocb *req, unsigned issue_flags)
                mask |= EPOLLONESHOT;
 
        if (def->pollin) {
-               mask |= POLLIN | POLLRDNORM;
+               mask |= EPOLLIN | EPOLLRDNORM;
 
                /* If reading from MSG_ERRQUEUE using recvmsg, ignore POLLIN */
                if ((req->opcode == IORING_OP_RECVMSG) &&
                    (req->sr_msg.msg_flags & MSG_ERRQUEUE))
-                       mask &= ~POLLIN;
+                       mask &= ~EPOLLIN;
        } else {
-               mask |= POLLOUT | POLLWRNORM;
+               mask |= EPOLLOUT | EPOLLWRNORM;
        }
        if (def->poll_exclusive)
                mask |= EPOLLEXCLUSIVE;