From 34a551a77017c69c77faca478234825f4c78fd90 Mon Sep 17 00:00:00 2001 From: Yang Xiuwei Date: Mon, 22 Jun 2026 16:56:23 +0800 Subject: [PATCH] block/cgroup: Drop stale -EBUSY retry from blkg_conf_prep() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since commit 8f4236d9008b ("block: remove QUEUE_FLAG_BYPASS and ->bypass") nothing in the blkcg blkg lookup/creation path returns -EBUSY anymore. blkg_conf_prep() nevertheless still retries at fail_exit with msleep(10) and restart_syscall() — logic added in 2012 when blk_queue_bypass() could cause blkg lookup/creation to fail with -EBUSY while the queue was temporarily bypassed during elevator changes. Signed-off-by: Yang Xiuwei Reviewed-by: Tao Cui --- block/blk-cgroup.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 3093c1c039022..259f2240e7df0 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -919,16 +919,6 @@ int blkg_conf_prep(struct blkcg *blkcg, const struct blkcg_policy *pol, spin_unlock_irq(&q->queue_lock); fail_exit: mutex_unlock(&q->blkcg_mutex); - /* - * If queue was bypassing, we should retry. Do so after a - * short msleep(). It isn't strictly necessary but queue - * can be bypassing for some time and it's always nice to - * avoid busy looping. - */ - if (ret == -EBUSY) { - msleep(10); - ret = restart_syscall(); - } return ret; } EXPORT_SYMBOL_GPL(blkg_conf_prep);