diff options
author | Jiri Kosina <jkosina@suse.cz> | 2022-12-13 14:28:47 +0100 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2022-12-13 14:28:47 +0100 |
commit | ab970ae1d63822228bdc84b9c1514efbd2f66da7 (patch) | |
tree | fefc08d8dd28e4eb5465ca85de5cce2fb6f1b7ef /io_uring/io_uring.h | |
parent | cfd1f6c16f7deadfe5269a76c1516405c4466481 (diff) | |
parent | 163a7fbff7a78c7c055e6c0ad26124ae551fe313 (diff) | |
download | linux-ab970ae1d63822228bdc84b9c1514efbd2f66da7.tar.bz2 |
Merge branch 'for-6.2/default-remove-cleanup' into for-linus
- removal of superfluous hid_hw_stop() calls for drivers with default
.remove callback (Marcus Folkesson)
Diffstat (limited to 'io_uring/io_uring.h')
-rw-r--r-- | io_uring/io_uring.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/io_uring/io_uring.h b/io_uring/io_uring.h index ef77d2aa3172..e99a79f2df9b 100644 --- a/io_uring/io_uring.h +++ b/io_uring/io_uring.h @@ -27,7 +27,7 @@ enum { struct io_uring_cqe *__io_get_cqe(struct io_ring_ctx *ctx, bool overflow); bool io_req_cqe_overflow(struct io_kiocb *req); int io_run_task_work_sig(struct io_ring_ctx *ctx); -int __io_run_local_work(struct io_ring_ctx *ctx, bool locked); +int __io_run_local_work(struct io_ring_ctx *ctx, bool *locked); int io_run_local_work(struct io_ring_ctx *ctx); void io_req_complete_failed(struct io_kiocb *req, s32 res); void __io_req_complete(struct io_kiocb *req, unsigned issue_flags); @@ -277,9 +277,18 @@ static inline int io_run_task_work_ctx(struct io_ring_ctx *ctx) static inline int io_run_local_work_locked(struct io_ring_ctx *ctx) { + bool locked; + int ret; + if (llist_empty(&ctx->work_llist)) return 0; - return __io_run_local_work(ctx, true); + + locked = true; + ret = __io_run_local_work(ctx, &locked); + /* shouldn't happen! */ + if (WARN_ON_ONCE(!locked)) + mutex_lock(&ctx->uring_lock); + return ret; } static inline void io_tw_lock(struct io_ring_ctx *ctx, bool *locked) |