Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 53bc7dc0 authored by Bob Liu's avatar Bob Liu Committed by Konrad Rzeszutek Wilk
Browse files

xen-blkback: replace work_pending with work_busy in purge_persistent_gnt()



The BUG_ON() in purge_persistent_gnt() will be triggered when previous purge
work haven't finished.

There is a work_pending() before this BUG_ON, but it doesn't account if the work
is still currently running.

CC: stable@vger.kernel.org
Acked-by: default avatarRoger Pau Monné <roger.pau@citrix.com>
Signed-off-by: default avatarBob Liu <bob.liu@oracle.com>
Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
parent 7b076750
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -382,8 +382,8 @@ static void purge_persistent_gnt(struct xen_blkif *blkif)
		return;
	}

	if (work_pending(&blkif->persistent_purge_work)) {
		pr_alert_ratelimited("Scheduled work from previous purge is still pending, cannot purge list\n");
	if (work_busy(&blkif->persistent_purge_work)) {
		pr_alert_ratelimited("Scheduled work from previous purge is still busy, cannot purge list\n");
		return;
	}