]> www.infradead.org Git - users/jedix/linux-maple.git/commit
io_uring/rw: don't mask in f_iocb_flags
authorJens Axboe <axboe@kernel.dk>
Tue, 17 Dec 2024 14:44:25 +0000 (07:44 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 27 Dec 2024 17:08:28 +0000 (10:08 -0700)
commit1143be17d7acb02a7c4dba6169a33534983f4960
treea38e069c08e41b4053629fce8474450cb576a620
parentce9464081d5168ee0f279d6932ba82260a5b97c4
io_uring/rw: don't mask in f_iocb_flags

A previous commit changed overwriting kiocb->ki_flags with
->f_iocb_flags with masking it in. This breaks for retry situations,
where we don't necessarily want to retain previously set flags, like
IOCB_NOWAIT.

The use case needs IOCB_HAS_METADATA to be persistent, but the change
makes all flags persistent, which is an issue. Add a request flag to
track whether the request has metadata or not, as that is persistent
across issues.

Fixes: 59a7d12a7fb5 ("io_uring: introduce attributes for read/write and PI support")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/io_uring_types.h
io_uring/rw.c