On Fri, Jun 20, 2025 at 09:10:07AM -0600, Caleb Sander Mateos wrote: > ublk_get_req_ref() and ublk_put_req_ref() currently call > ublk_need_req_ref(ubq) to check whether the ublk device features require > reference counting of its requests. However, all callers already know > that reference counting is required: > - __ublk_check_and_get_req() is only called from > ublk_check_and_get_req() if user copy is enabled, and from > ublk_register_io_buf() if zero copy is enabled > - ublk_io_release() is only called for requests registered by > ublk_register_io_buf(), which requires zero copy > - ublk_ch_read_iter() and ublk_ch_write_iter() only call > ublk_put_req_ref() if ublk_check_and_get_req() succeeded, which > requires user copy to be enabled > > So drop the ublk_need_req_ref() check and the ubq argument in > ublk_get_req_ref() and ublk_put_req_ref(). > > Signed-off-by: Caleb Sander Mateos <csander@xxxxxxxxxxxxxxx> Reviewed-by: Ming Lei <ming.lei@xxxxxxxxxx> Thanks, Ming