From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933719AbbIVS2v (ORCPT ); Tue, 22 Sep 2015 14:28:51 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:42603 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758549AbbIVRxb (ORCPT ); Tue, 22 Sep 2015 13:53:31 -0400 From: Kamal Mostafa To: linux-kernel@vger.kernel.org, stable@vger.kernel.org, kernel-team@lists.ubuntu.com Cc: Bob Liu , Konrad Rzeszutek Wilk , Kamal Mostafa Subject: [PATCH 3.19.y-ckt 021/102] xen-blkback: replace work_pending with work_busy in purge_persistent_gnt() Date: Tue, 22 Sep 2015 10:51:17 -0700 Message-Id: <1442944358-1248-22-git-send-email-kamal@canonical.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1442944358-1248-1-git-send-email-kamal@canonical.com> References: <1442944358-1248-1-git-send-email-kamal@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Extended-Stable: 3.19 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.19.8-ckt7 -stable review patch. If anyone has any objections, please let me know. ------------------ From: Bob Liu commit 53bc7dc004fecf39e0ba70f2f8d120a1444315d3 upstream. 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. Acked-by: Roger Pau Monné Signed-off-by: Bob Liu Signed-off-by: Konrad Rzeszutek Wilk [ kamal: backport to 3.19-stable: context ] Signed-off-by: Kamal Mostafa --- drivers/block/xen-blkback/blkback.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c index 63fc7f0..02004e1 100644 --- a/drivers/block/xen-blkback/blkback.c +++ b/drivers/block/xen-blkback/blkback.c @@ -350,8 +350,8 @@ static void purge_persistent_gnt(struct xen_blkif *blkif) return; } - if (work_pending(&blkif->persistent_purge_work)) { - pr_alert_ratelimited(DRV_PFX "Scheduled work from previous purge is still pending, cannot purge list\n"); + if (work_busy(&blkif->persistent_purge_work)) { + pr_alert_ratelimited(DRV_PFX "Scheduled work from previous purge is still busy, cannot purge list\n"); return; } -- 1.9.1