[PATCH v2] block/cgroup: Drop stale -EBUSY retry from blkg_conf_prep()
Yang Xiuwei <[email protected]> Thu, 30 Jul 2026 15:39:39 +0800
| Newsgroups | org.kernel.vger.cgroups,org.kernel.vger.linux-block |
|---|---|
| Message-ID | <[email protected]> |
Drop the unreachable -EBUSY retry in blkg_conf_prep().
Commit e56da7e28796 ("blkcg: don't allow or retain configuration of
missing devices") added an msleep()/restart_syscall() retry for
temporary queue bypass. After commit 8f4236d9008b ("block: remove
QUEUE_FLAG_BYPASS and ->bypass"), nothing returns -EBUSY here
anymore. Remove the dead code and the unused linux/delay.h include.
Signed-off-by: Yang Xiuwei <[email protected]>
Reviewed-by: Tao Cui <[email protected]>
Reviewed-by: Tang Yizhou <[email protected]>
---
Changes in v2:
- Mention e56da7e28796 instead of vague "logic added in 2012"
- Also drop unused #include <linux/delay.h>
v1: https://lore.kernel.org/linux-block/[email protected]/
block/blk-cgroup.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index d9676126c5b5..682faa486354 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -23,7 +23,6 @@
#include <linux/blkdev.h>
#include <linux/backing-dev.h>
#include <linux/slab.h>
-#include <linux/delay.h>
#include <linux/wait_bit.h>
#include <linux/atomic.h>
#include <linux/ctype.h>
@@ -917,16 +916,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);
--
2.25.1