Re: [PATCH v4] loop: defer the queue limits clear to a workqueue

From: Bart Van Assche

Date: Mon Sep 21 2026 - 13:42:25 EST


On 9/19/26 3:47 AM, Tao Cui wrote:
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 9f6e518e60d28..d6460f359c0a8 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -68,9 +68,10 @@ struct loop_device {
struct list_head idle_worker_list;
struct rb_root worker_tree;
struct work_struct clear_limits_work;
- atomic_t clear_limits_mode;
- atomic_t rebind_gen;
- atomic_t clear_limits_gen;
+ struct mutex clear_limits_lock;
+ unsigned int clear_limits_mode;
+ unsigned int rebind_gen;
+ unsigned int clear_limits_gen;

This patch has been generated as a diff compared to v3. Please make sure
that your patch applies cleanly to Jens' for-next branch.

Thanks,

Bart.