Re: [PATCH] ublk: remove unnecessary checks in ublk_check_and_get_req()
From: Ming Lei
Date: Sun Nov 09 2025 - 09:10:36 EST
On Sat, Nov 08, 2025 at 03:17:45PM -0700, Caleb Sander Mateos wrote:
> ub = iocb->ki_filp->private_data cannot be NULL, as it's set in
> ublk_ch_open() before it returns succesfully. req->mq_hctx cannot be
> NULL as any inflight ublk request must belong to some queue. And
> req->mq_hctx->driver_data cannot be NULL as it's set to the ublk_queue
> pointer in ublk_init_hctx(). So drop the unnecessary checks.
>
> Signed-off-by: Caleb Sander Mateos <csander@xxxxxxxxxxxxxxx>
Looks fine,
Reviewed-by: Ming Lei <ming.lei@xxxxxxxxxx>
Thanks,
Ming