Skip to content

Commit 01ceec0

Browse files
calebsanderaxboe
authored andcommitted
ublk: remove unused req argument from ublk_sub_req_ref()
Since commit b749965 ("ublk: remove ublk_commit_and_fetch()"), ublk_sub_req_ref() no longer uses its struct request *req argument. So drop the argument from ublk_sub_req_ref(), and from ublk_need_complete_req(), which only passes it to ublk_sub_req_ref(). Signed-off-by: Caleb Sander Mateos <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent e56828f commit 01ceec0

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

drivers/block/ublk_drv.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ static inline void ublk_put_req_ref(struct ublk_io *io, struct request *req)
714714
__ublk_complete_rq(req);
715715
}
716716

717-
static inline bool ublk_sub_req_ref(struct ublk_io *io, struct request *req)
717+
static inline bool ublk_sub_req_ref(struct ublk_io *io)
718718
{
719719
unsigned sub_refs = UBLK_REFCOUNT_INIT - io->task_registered_buffers;
720720

@@ -2243,11 +2243,10 @@ static int ublk_check_commit_and_fetch(const struct ublk_queue *ubq,
22432243
}
22442244

22452245
static bool ublk_need_complete_req(const struct ublk_queue *ubq,
2246-
struct ublk_io *io,
2247-
struct request *req)
2246+
struct ublk_io *io)
22482247
{
22492248
if (ublk_need_req_ref(ubq))
2250-
return ublk_sub_req_ref(io, req);
2249+
return ublk_sub_req_ref(io);
22512250
return true;
22522251
}
22532252

@@ -2359,7 +2358,7 @@ static int __ublk_ch_uring_cmd(struct io_uring_cmd *cmd,
23592358
io->res = ub_cmd->result;
23602359
req = ublk_fill_io_cmd(io, cmd);
23612360
ret = ublk_config_io_buf(ubq, io, cmd, ub_cmd->addr, &buf_idx);
2362-
compl = ublk_need_complete_req(ubq, io, req);
2361+
compl = ublk_need_complete_req(ubq, io);
23632362

23642363
/* can't touch 'ublk_io' any more */
23652364
if (buf_idx != UBLK_INVALID_BUF_IDX)

0 commit comments

Comments
 (0)