io_uring: return EBADFD when ring isn't in the right state
authorStefano Garzarella <sgarzare@redhat.com>
Tue, 8 Sep 2020 16:52:42 +0000 (18:52 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 9 Sep 2020 16:58:09 +0000 (10:58 -0600)
commit00387aed4b12600c63c4db940b17f41688d5a193
treeb57c5c0acf42ca33cbf503351e2df90a4ae42ff9
parentfe863c4ca34f2422283d17d14b25efa72662510d
io_uring: return EBADFD when ring isn't in the right state

This patch uniforms the returned error (EBADFD) when the ring state
(enabled/disabled) is not the expected one.

The changes affect io_uring_enter() and io_uring_register() syscalls.

Fixes: 7ec3d1dd9378 ("io_uring: allow disabling rings during the creation")
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c