]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: fix openat/openat2 unified prep handling
authorJens Axboe <axboe@kernel.dk>
Sat, 19 Sep 2020 01:36:24 +0000 (19:36 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 21 Sep 2020 13:51:03 +0000 (07:51 -0600)
commitfc55faab44d34181a8c924e580f5634e6b725705
tree61a853fa6802fe118eb6856f8a97a241bb53851e
parentb4d48fbedf668ffd674ce8c202c7282218967cee
io_uring: fix openat/openat2 unified prep handling

A previous commit unified how we handle prep for these two functions,
but this means that we check the allowed context (SQPOLL, specifically)
later than we should. Move the ring type checking into the two parent
functions, instead of doing it after we've done some setup work.

Fixes: 6fcf25f0d5d7 ("io_uring: deduplicate io_openat{,2}_prep()")
Reported-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c