io_uring: always allow drain/link/hardlink/async sqe flags
authorDaniele Albano <d.albano@gmail.com>
Sat, 18 Jul 2020 20:15:16 +0000 (14:15 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Aug 2020 07:58:48 +0000 (09:58 +0200)
commit15692a520ee4d3d21d78b5e63cf7467d691cf1db
treea81a6d12468bdc07e220be8101d5fdca762357e5
parent35d0ab9e3de8515d48c31086f1765ab5f149976c
io_uring: always allow drain/link/hardlink/async sqe flags

[ Upstream commit 61710e437f2807e26a3402543bdbb7217a9c8620 ]

We currently filter these for timeout_remove/async_cancel/files_update,
but we only should be filtering for fixed file and buffer select. This
also causes a second read of sqe->flags, which isn't needed.

Just check req->flags for the relevant bits. This then allows these
commands to be used in links, for example, like everything else.

Signed-off-by: Daniele Albano <d.albano@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/io_uring.c