]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
io_uring/rw: use cached file rather than req->file
authorJens Axboe <axboe@kernel.dk>
Tue, 17 Mar 2026 20:21:58 +0000 (14:21 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 17 Mar 2026 20:35:00 +0000 (14:35 -0600)
commit3e97c2582f8450117dfa14cc672437afb31233a0
tree58b63048ccfdea2018660bd528510a39d3438d01
parent0a6b9ae1f314c92141b851fcbc2f7b4d0cd2e340
io_uring/rw: use cached file rather than req->file

In io_rw_init_file(), req->file is cached in file, yet the former is
still being used when checking for O_DIRECT. As this is post setting
the kiocb flags, the compiler has to reload req->file. Just use the
locally cached file instead.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/rw.c