diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2025-02-24 12:42:23 +0000 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2025-02-24 12:10:38 -0700 |
commit | 0cd64345c4ba127d27fa07a133d108ea92d38361 (patch) | |
tree | e7945536e9845f78cddb71dc1dd45741c66d10c8 | |
parent | 52524b281d5746cf9dbd53a7dffce9576e8ddd30 (diff) |
io_uring/waitid: use io_is_compat()
Use io_is_compat() for consistency.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Reviewed-by: Anuj Gupta <anuj20.g@samsung.com>
Link: https://lore.kernel.org/r/28c5b5f1f1bf7f4d18869dafe6e4147ce1bbf0f5.1740400452.git.asml.silence@gmail.com
Link: https://lore.kernel.org/r/20250224172337.2009871-1-csander@purestorage.com
[axboe: fold in improvement from Caleb, see link]
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | io_uring/waitid.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/io_uring/waitid.c b/io_uring/waitid.c index 347b8f53efa7..54e69984cd8a 100644 --- a/io_uring/waitid.c +++ b/io_uring/waitid.c @@ -42,7 +42,6 @@ static void io_waitid_free(struct io_kiocb *req) req->flags &= ~REQ_F_ASYNC_DATA; } -#ifdef CONFIG_COMPAT static bool io_waitid_compat_copy_si(struct io_waitid *iw, int signo) { struct compat_siginfo __user *infop; @@ -67,7 +66,6 @@ Efault: ret = false; goto done; } -#endif static bool io_waitid_copy_si(struct io_kiocb *req, int signo) { @@ -77,10 +75,8 @@ static bool io_waitid_copy_si(struct io_kiocb *req, int signo) if (!iw->infop) return true; -#ifdef CONFIG_COMPAT - if (req->ctx->compat) + if (io_is_compat(req->ctx)) return io_waitid_compat_copy_si(iw, signo); -#endif if (!user_write_access_begin(iw->infop, sizeof(*iw->infop))) return false; |