Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753926AbbGUDbV (ORCPT ); Mon, 20 Jul 2015 23:31:21 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:16505 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753354AbbGUDbR (ORCPT ); Mon, 20 Jul 2015 23:31:17 -0400 From: Bob Liu To: xen-devel@lists.xenproject.org Cc: david.vrabel@citrix.com, linux-kernel@vger.kernel.org, roger.pau@citrix.com, konrad.wilk@oracle.com, Bob Liu Subject: [PATCH 3/3] xen-blkback: rm BUG_ON() in purge_persistent_gnt() Date: Tue, 21 Jul 2015 11:30:41 +0800 Message-Id: <1437449441-2964-3-git-send-email-bob.liu@oracle.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1437449441-2964-1-git-send-email-bob.liu@oracle.com> References: <1437449441-2964-1-git-send-email-bob.liu@oracle.com> X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1121 Lines: 31 This BUG_ON() will be triggered when previous purge work haven't finished. It's reasonable under pretty extreme load and should not panic the system. Signed-off-by: Bob Liu --- drivers/block/xen-blkback/blkback.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c index ced9677..b90ac8e 100644 --- a/drivers/block/xen-blkback/blkback.c +++ b/drivers/block/xen-blkback/blkback.c @@ -394,7 +394,9 @@ static void purge_persistent_gnt(struct xen_blkif *blkif) pr_debug("Going to purge %u persistent grants\n", num_clean); - BUG_ON(!list_empty(&blkif->persistent_purge_list)); + if (!list_empty(&blkif->persistent_purge_list)) + return; + root = &blkif->persistent_gnts; purge_list: foreach_grant_safe(persistent_gnt, n, root, node) { -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/