From: Nilay Shroff <nilay@linux.ibm.com>
To: axboe@kernel.dk, mt4022@columbia.edu, hch@lst.de,
mkhalfella@purestorage.com, bvanassche@acm.org,
kbusch@kernel.org, josef@toxicpanda.com, tom.leiming@gmail.com,
tz2294@columbia.edu, gjoyce@linux.ibm.com
Cc: linux-block@vger.kernel.org, Nilay Shroff <nilay@linux.ibm.com>
Subject: [PATCH 2/3] block: remove unused blk_mq_free_sched_res_batch()
Date: Thu, 3 Dec 2026 20:52:38 +0530 [thread overview]
Message-ID: <20261203152318.654390-7-nilay@linux.ibm.com> (raw)
In-Reply-To: <20261203152318.654390-5-nilay@linux.ibm.com>
blk_mq_free_sched_res_batch() is not used by any code path.
Remove its implementation and declaration.
Signed-off-by: Nilay Shroff <nilay@linux.ibm.com>
---
block/blk-mq-sched.c | 27 ---------------------------
block/blk-mq-sched.h | 2 --
2 files changed, 29 deletions(-)
diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c
index d7b45778732b..bf501f772f9c 100644
--- a/block/blk-mq-sched.c
+++ b/block/blk-mq-sched.c
@@ -446,33 +446,6 @@ void blk_mq_free_sched_res(struct elevator_resources *res,
}
}
-void blk_mq_free_sched_res_batch(struct xarray *elv_tbl,
- struct blk_mq_tag_set *set)
-{
- struct request_queue *q;
- struct elv_change_ctx *ctx;
-
- lockdep_assert_held_write(&set->update_nr_hwq_lock);
-
- list_for_each_entry(q, &set->tag_list, tag_set_list) {
- /*
- * Accessing q->elevator without holding q->elevator_lock is
- * safe because we're holding here set->update_nr_hwq_lock in
- * the writer context. So, scheduler update/switch code (which
- * acquires the same lock but in the reader context) can't run
- * concurrently.
- */
- if (q->elevator) {
- ctx = xa_load(elv_tbl, q->id);
- if (!ctx) {
- WARN_ON_ONCE(1);
- continue;
- }
- blk_mq_free_sched_res(&ctx->res, ctx->type, set);
- }
- }
-}
-
void blk_mq_free_sched_ctx_batch(struct xarray *elv_tbl)
{
unsigned long i;
diff --git a/block/blk-mq-sched.h b/block/blk-mq-sched.h
index 5678e15bd33c..50e19f5ca90a 100644
--- a/block/blk-mq-sched.h
+++ b/block/blk-mq-sched.h
@@ -39,8 +39,6 @@ void blk_mq_free_sched_tags(struct elevator_tags *et,
void blk_mq_free_sched_res(struct elevator_resources *res,
struct elevator_type *type,
struct blk_mq_tag_set *set);
-void blk_mq_free_sched_res_batch(struct xarray *et_table,
- struct blk_mq_tag_set *set);
/*
* blk_mq_alloc_sched_data() - Allocates scheduler specific data
* Returns:
--
2.53.0
next prev parent reply other threads:[~2026-12-03 15:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 15:22 [PATCH 0/3] block: remove RCU protection and add context annotation Nilay Shroff
2026-12-03 15:22 ` [PATCH 1/3] block: remove RCU protection for tag_set_list Nilay Shroff
2026-12-03 15:22 ` Nilay Shroff [this message]
2026-12-03 15:22 ` [PATCH 3/3] block: add context annotations for tag_list_lock and quiesce_lock Nilay Shroff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261203152318.654390-7-nilay@linux.ibm.com \
--to=nilay@linux.ibm.com \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=gjoyce@linux.ibm.com \
--cc=hch@lst.de \
--cc=josef@toxicpanda.com \
--cc=kbusch@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=mkhalfella@purestorage.com \
--cc=mt4022@columbia.edu \
--cc=tom.leiming@gmail.com \
--cc=tz2294@columbia.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox