diff options
author | Bob Liu <bob.liu@oracle.com> | 2015-07-22 14:40:10 +0800 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2015-09-15 13:56:47 -0400 |
commit | 92eea3808638b5cbce8b542135892cf15e4ae0ad (patch) | |
tree | cf39be6fa20e1f888b56e1dccf55c3eb5b912572 | |
parent | 71ae6a566657e8df4f8797ef91d6cf1a0e1bc7e4 (diff) | |
download | lwn-92eea3808638b5cbce8b542135892cf15e4ae0ad.tar.gz lwn-92eea3808638b5cbce8b542135892cf15e4ae0ad.zip |
xen-blkback: replace work_pending with work_busy in purge_persistent_gnt()
[ Upstream commit 53bc7dc004fecf39e0ba70f2f8d120a1444315d3 ]
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: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Bob Liu <bob.liu@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
-rw-r--r-- | drivers/block/xen-blkback/blkback.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c index 63fc7f06a014..0c858a60dc40 100644 --- a/drivers/block/xen-blkback/blkback.c +++ b/drivers/block/xen-blkback/blkback.c @@ -350,7 +350,7 @@ static void purge_persistent_gnt(struct xen_blkif *blkif) return; } - if (work_pending(&blkif->persistent_purge_work)) { + if (work_busy(&blkif->persistent_purge_work)) { pr_alert_ratelimited(DRV_PFX "Scheduled work from previous purge is still pending, cannot purge list\n"); return; } |