summaryrefslogtreecommitdiffstats
path: root/fs/io-wq.h
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2021-02-04 14:52:08 +0100
committerJens Axboe <axboe@kernel.dk>2021-02-04 16:05:46 +0100
commit5280f7e530f71ba85baf90169393196976ad0e52 (patch)
treeefdf0f85b6f1f0b3f167091566701131de8afbf5 /fs/io-wq.h
parentio_uring: deduplicate file table slot calculation (diff)
downloadlinux-5280f7e530f71ba85baf90169393196976ad0e52.tar.xz
linux-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.h4
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;