Skip to content

Commit e6ed0f0

Browse files
committed
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>
1 parent 51fff55 commit e6ed0f0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

io_uring/register.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ static __cold int io_parse_restrictions(void __user *arg, unsigned int nr_args,
150150
}
151151
}
152152
ret = nr_args;
153+
restrictions->registered = true;
153154
err:
154155
kfree(res);
155156
return ret;
@@ -174,7 +175,6 @@ static __cold int io_register_restrictions(struct io_ring_ctx *ctx,
174175
memset(&ctx->restrictions, 0, sizeof(ctx->restrictions));
175176
return ret;
176177
}
177-
ctx->restrictions.registered = true;
178178
return 0;
179179
}
180180

0 commit comments

Comments
 (0)