[Devel] [PATCH hci-8.2 v12 6/9] dm-ploop: use wake_up() for inflight_md_wq

Alexander Ivanov alexander.ivanov at virtuozzo.com
Fri Nov 20 19:05:15 MSK 2026


ploop_put_piwb() and ploop_break_bat_update() wake inflight_md_wq with
wake_up_interruptible(), which wakes only TASK_INTERRUPTIBLE waiters.
The only waiter now, in ploop_suspend_submitting_pios(), sleeps
interruptibly, but the next patch adds uninterruptible waits for
inflight_md on postsuspend and preresume. A suspend that catches the
last BAT write in flight would sleep there forever with
md->suspend_lock held. Use wake_up(), which wakes both kinds.

https://virtuozzo.atlassian.net/browse/VSTOR-148171
Feature: dm-ploop: ploop target driver

Signed-off-by: Alexander Ivanov <alexander.ivanov at virtuozzo.com>
Reviewed-by: Sashiko <no-reply at sashiko.virtuozzo.com>
---
 drivers/md/dm-ploop-map.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index 96cb108015d5..ee3adfbe5f64 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -942,7 +942,7 @@ static void ploop_put_piwb(struct ploop_index_wb *piwb)
 		 */
 
 		if (atomic_dec_and_test(&piwb->ploop->inflight_md))
-			wake_up_interruptible(&piwb->ploop->inflight_md_wq);
+			wake_up(&piwb->ploop->inflight_md_wq);
 		ploop_free_piwb(piwb);
 	}
 }
@@ -1115,7 +1115,7 @@ void ploop_break_bat_update(struct ploop *ploop, struct md_page *md,
 	spin_unlock_irqrestore(&ploop->bat_lock, flags);
 
 	if (atomic_dec_and_test(&ploop->inflight_md))
-		wake_up_interruptible(&ploop->inflight_md_wq);
+		wake_up(&ploop->inflight_md_wq);
 	ploop_free_piwb(piwb);
 }
 
-- 
2.53.0



More information about the Devel mailing list