From: Jens Axboe Date: Tue, 22 Nov 2022 22:25:24 +0000 (-0700) Subject: io_uring/bundle: disable IOSQE_IO_DRAIN on bundle requests X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=refs%2Fheads%2Fio_uring-bundle;p=linux-2.6-block.git io_uring/bundle: disable IOSQE_IO_DRAIN on bundle requests We could support this and prep bundle members early, but let's just disallow drain with bundles. It is expected that most users of bundles would use IOSQE_CQE_SKIP_SUCCESS as part of the bundle, and that doesn't work with IOSQE_IO_DRAIN anyway as it's explicitly disallowed. Signed-off-by: Jens Axboe --- diff --git a/io_uring/bundle.c b/io_uring/bundle.c index 056d5ce357d2..c5d49dbee1a5 100644 --- a/io_uring/bundle.c +++ b/io_uring/bundle.c @@ -99,7 +99,7 @@ static bool io_bundle_init(struct io_kiocb *req, const struct io_uring_sqe *sqe) sqe->personality || sqe->splice_fd_in || sqe->file_index || sqe->addr3) return true; - if (req->flags & REQ_F_FORCE_ASYNC) + if (req->flags & (REQ_F_FORCE_ASYNC | REQ_F_IO_DRAIN)) return true; if (WARN_ON_ONCE(ctx->submit_state.parent)) return true;