io_uring: remove checks for NULL 'sq_offset'
Since the 5.12 kernel release, nobody has been passing NULL as the sq_offset pointer. Remove the checks for it being NULL or not, it will always be valid. Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
d13ddd9c89
commit
547988ad0f
@ -2597,13 +2597,11 @@ static unsigned long rings_size(struct io_ring_ctx *ctx, unsigned int sq_entries
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (ctx->flags & IORING_SETUP_NO_SQARRAY) {
|
if (ctx->flags & IORING_SETUP_NO_SQARRAY) {
|
||||||
if (sq_offset)
|
*sq_offset = SIZE_MAX;
|
||||||
*sq_offset = SIZE_MAX;
|
|
||||||
return off;
|
return off;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sq_offset)
|
*sq_offset = off;
|
||||||
*sq_offset = off;
|
|
||||||
|
|
||||||
sq_array_size = array_size(sizeof(u32), sq_entries);
|
sq_array_size = array_size(sizeof(u32), sq_entries);
|
||||||
if (sq_array_size == SIZE_MAX)
|
if (sq_array_size == SIZE_MAX)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user