mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:24:45 +01:00
io_uring/register: have io_parse_restrictions() set restrictions enabled
Rather than leave this to the caller, have io_parse_restrictions() set ->registered = true if restrictions have been enabled. This is in preparation for having finer grained restrictions. Reviewed-by: Gabriel Krisman Bertazi <krisman@suse.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
51fff55a66
commit
e6ed0f051d
1 changed files with 1 additions and 1 deletions
|
|
@ -150,6 +150,7 @@ static __cold int io_parse_restrictions(void __user *arg, unsigned int nr_args,
|
|||
}
|
||||
}
|
||||
ret = nr_args;
|
||||
restrictions->registered = true;
|
||||
err:
|
||||
kfree(res);
|
||||
return ret;
|
||||
|
|
@ -174,7 +175,6 @@ static __cold int io_register_restrictions(struct io_ring_ctx *ctx,
|
|||
memset(&ctx->restrictions, 0, sizeof(ctx->restrictions));
|
||||
return ret;
|
||||
}
|
||||
ctx->restrictions.registered = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue