Just a cleanup, makes the code easier to read without too many dependent
nested checks.
Reviewed-by: Gabriel Krisman Bertazi <krisman@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
struct io_kiocb *req,
unsigned int sqe_flags)
{
+ if (!ctx->restricted)
+ return true;
if (!test_bit(req->opcode, ctx->restrictions.sqe_op))
return false;
}
}
if (unlikely(ctx->restricted || ctx->drain_active || ctx->drain_next)) {
- if (ctx->restricted && !io_check_restriction(ctx, req, sqe_flags))
+ if (!io_check_restriction(ctx, req, sqe_flags))
return io_init_fail_req(req, -EACCES);
/* knock it to the slow queue path, will be drained there */
if (ctx->drain_active)