diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2021-02-04 13:52:08 +0000 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-02-04 08:05:46 -0700 |
commit | 5280f7e530f71ba85baf90169393196976ad0e52 (patch) | |
tree | efdf0f85b6f1f0b3f167091566701131de8afbf5 /fs/io-wq.h | |
parent | ea64ec02b31d5b05ae94ac4d57e38f8a02117c76 (diff) | |
download | linux-stable-5280f7e530f71ba85baf90169393196976ad0e52.tar.gz linux-stable-5280f7e530f71ba85baf90169393196976ad0e52.tar.bz2 linux-stable-5280f7e530f71ba85baf90169393196976ad0e52.zip |
io_uring/io-wq: return 2-step work swap scheme
Saving one lock/unlock for io-wq is not super important, but adds some
ugliness in the code. More important, atomic decs not turning it to zero
for some archs won't give the right ordering/barriers so the
io_steal_work() may pretty easily get subtly and completely broken.
Return back 2-step io-wq work exchange and clean it up.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io-wq.h')
-rw-r--r-- | fs/io-wq.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/io-wq.h b/fs/io-wq.h index e1ffb80a4a1d..e37a0f217cc8 100644 --- a/fs/io-wq.h +++ b/fs/io-wq.h @@ -106,8 +106,8 @@ static inline struct io_wq_work *wq_next_work(struct io_wq_work *work) return container_of(work->list.next, struct io_wq_work, list); } -typedef void (free_work_fn)(struct io_wq_work *); -typedef struct io_wq_work *(io_wq_work_fn)(struct io_wq_work *); +typedef struct io_wq_work *(free_work_fn)(struct io_wq_work *); +typedef void (io_wq_work_fn)(struct io_wq_work *); struct io_wq_data { struct user_struct *user; |