aboutsummaryrefslogtreecommitdiff
path: root/io_uring/io_uring.h
diff options
context:
space:
mode:
authorGravatar Pavel Begunkov <asml.silence@gmail.com> 2024-03-18 22:00:35 +0000
committerGravatar Jens Axboe <axboe@kernel.dk> 2024-04-15 08:10:24 -0600
commitc133b3b06b0653036b0c07675c1db0c89467ccdb (patch)
treef3768b5b3af2c343193d4e99939486cb3e79e2f7 /io_uring/io_uring.h
parentio_uring: refactor io_req_complete_post() (diff)
downloadlinux-c133b3b06b0653036b0c07675c1db0c89467ccdb.tar.gz
linux-c133b3b06b0653036b0c07675c1db0c89467ccdb.tar.bz2
linux-c133b3b06b0653036b0c07675c1db0c89467ccdb.zip
io_uring: clean up io_lockdep_assert_cq_locked
Move CONFIG_PROVE_LOCKING checks inside of io_lockdep_assert_cq_locked() and kill the else branch. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Tested-by: Ming Lei <ming.lei@redhat.com> Link: https://lore.kernel.org/r/bbf33c429c9f6d7207a8fe66d1a5866ec2c99850.1710799188.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/io_uring.h')
-rw-r--r--io_uring/io_uring.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/io_uring/io_uring.h b/io_uring/io_uring.h
index f694e7e6fb25..bae8c1e937c1 100644
--- a/io_uring/io_uring.h
+++ b/io_uring/io_uring.h
@@ -119,9 +119,9 @@ enum {
void io_eventfd_ops(struct rcu_head *rcu);
void io_activate_pollwq(struct io_ring_ctx *ctx);
-#if defined(CONFIG_PROVE_LOCKING)
static inline void io_lockdep_assert_cq_locked(struct io_ring_ctx *ctx)
{
+#if defined(CONFIG_PROVE_LOCKING)
lockdep_assert(in_task());
if (ctx->flags & IORING_SETUP_IOPOLL) {
@@ -140,12 +140,8 @@ static inline void io_lockdep_assert_cq_locked(struct io_ring_ctx *ctx)
else
lockdep_assert(current == ctx->submitter_task);
}
-}
-#else
-static inline void io_lockdep_assert_cq_locked(struct io_ring_ctx *ctx)
-{
-}
#endif
+}
static inline void io_req_task_work_add(struct io_kiocb *req)
{