]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: correct O_NONBLOCK check for splice punt
authorJens Axboe <axboe@kernel.dk>
Mon, 13 Apr 2020 03:12:49 +0000 (21:12 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 13 Apr 2020 03:16:01 +0000 (21:16 -0600)
commite219e568a039e5c8c653ba62e407e7a9a1632d19
treece168deef967746e8ebc79d895661c2f128ef2b7
parent9c72238447bc1ab936ad2bcda2d44f1b9f3cb500
io_uring: correct O_NONBLOCK check for splice punt

The splice file punt check uses file->f_mode to check for O_NONBLOCK,
but it should be checking file->f_flags. This leads to punting even
for files that have O_NONBLOCK set, which isn't necessary. This equates
to checking for FMODE_PATH, which will never be set on the fd in
question.

Fixes: 29fbf1be711f ("io_uring: add splice(2) support")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c