[Devel] [PATCH RH8 05/14] push_backup: Use nr_delayed in postpone_if_required_for_backup()

Kirill Tkhai ktkhai at virtuozzo.com
Mon Sep 6 18:34:35 MSK 2021


Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 drivers/md/dm-push-backup.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/dm-push-backup.c b/drivers/md/dm-push-backup.c
index 739f1a8a5e6a..90562178f9a6 100644
--- a/drivers/md/dm-push-backup.c
+++ b/drivers/md/dm-push-backup.c
@@ -234,7 +234,7 @@ static bool postpone_if_required_for_backup(struct push_backup *pb,
 		goto unlock;
 	}
 
-	if (RB_EMPTY_ROOT(&pb->rb_root)) {
+	if (pb->nr_delayed == 1) { /* We are the first */
 		pb->deadline_jiffies = get_jiffies_64() + pb->timeout_in_jiffies;
 		queue_timer = true;
 	}




More information about the Devel mailing list