]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: assign file_slot prior to calling io_sqe_file_register()
authorJens Axboe <axboe@kernel.dk>
Thu, 11 Feb 2021 14:45:08 +0000 (07:45 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 11 Feb 2021 14:45:08 +0000 (07:45 -0700)
commitb41c8da208f204d634e29659bac8d02118490f76
treeddea5dc0e285d287c4205d38a5db0c1c8491d006
parentf36681a8ce01928a151233c06e58e70dc3421288
io_uring: assign file_slot prior to calling io_sqe_file_register()

We use the assigned slot in io_sqe_file_register(), and a previous
patch moved the assignment to after we have called it. This isn't
super pretty, and will get cleaned up in the future. For now, fix
the regression by restoring the previous assignment/clear of the
file_slot.

Fixes: 9151ff5f3aca ("io_uring: deduplicate file table slot calculation")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c