Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2166015imm; Tue, 2 Oct 2018 22:42:51 -0700 (PDT) X-Google-Smtp-Source: ACcGV62TVgUn0bjks37ijKns50dtmq8nkWRl/+udQV7OjOxzYVravTIYnV0BRnInTfPmbhc97wAP X-Received: by 2002:a65:52c1:: with SMTP id z1-v6mr6989475pgp.65.1538545371614; Tue, 02 Oct 2018 22:42:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538545371; cv=none; d=google.com; s=arc-20160816; b=mJQXWZeSho3dXzOHdfXvXQqmdfCmJ4k58nnQgcVRc3PoDAOLG+/4mdOQhQEfe1axw4 g5l/b9buV4cULuURuwJq6ny7AsaAaCDWM1URoHlnqoWceaLUliTB7NCzi9b3oTMVNKiI dAM7C9egPYW6iACTd7WoDcZctTrRO7j+estfeCkKWM3AZ4KlocHj4Tj4KqBECaEU4LWo cHRNchnAfPb2qEcEB4MwnIprr3gTDMqQs/stgz6fasm31YVKmJkVNos+YgnxsknLyIiY ysMOpBFjb00VRkxgnW5beqwxLPcLTJWq+vvAQfiOnTMYlq+lL+ueNJjGGhPBDEHFX5bM C7/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :reply-to:references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=uJYZzACrqvzATTatvGUYsDZ71l09xOMCA8Wn8dpDwDY=; b=FfCMo4C5L+Uw5zMpbtmNpVFOdrxmbaMaiCioE4+DQxEMADzfmkaz3hGga1zSht9cZG AkzYNfc3z/jFm41HgJ5L67pf6KU46eJhbgN+YmwYaYEJ2PyokSKt/IB2G9j2VXqQ/j8F jJvTMpofqD1EMvjOZb6c7xk8LbrNXyovjyKT6THLjJZ3eNxquYp84+mqV1Xzylh8Jh+t Nb4TO1pF9bmUH16h8pBpbMK0bng2GiplqM6hHfm8TZdmpj2ojEIQMV5H4qxdRv0Zf0Ua 1dDT+JURxn8jYuzx/rDqbqGkO2+RJGm/u3d7Y2RSwiKTeX33FAt6MWywpAz0FhFBCG5N ywaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=roO5FrLl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i7-v6si277353pgs.174.2018.10.02.22.42.36; Tue, 02 Oct 2018 22:42:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=roO5FrLl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726884AbeJCM0h (ORCPT + 99 others); Wed, 3 Oct 2018 08:26:37 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:38139 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726405AbeJCM0g (ORCPT ); Wed, 3 Oct 2018 08:26:36 -0400 Received: by mail-pg1-f194.google.com with SMTP id r77-v6so1026499pgr.5 for ; Tue, 02 Oct 2018 22:39:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=uJYZzACrqvzATTatvGUYsDZ71l09xOMCA8Wn8dpDwDY=; b=roO5FrLlm7MT/Ms/hie/C8qhVYajGqGbxQSFzkQANd4HK8+X437lAb0nrbI83I85vB m2o5dUt293fNaQYaA5XT9yjfcOkYHCM8DYIpZp7KZV3NLxCjWnccgJyvDUWcrUwJCLL4 DAypkM55N1egx5LjDImsax+xWEG+1Jm6SqNUKxzG48YY/TWXhKomeqx05wGiZRCSWzDi 8zOXS0kY7C0I6DnFTNPF8VVV1M23FFkng6g8qNDl2x4QeaIEvoi3ajzfyijJS3KORDVD z+eQoH8zqc8nYDa4PYyPpxfYtKdWeaLYZrZ+s4yauKXQ4FLPvU5L/T5Y1hx2OAmB2jCI qhwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=uJYZzACrqvzATTatvGUYsDZ71l09xOMCA8Wn8dpDwDY=; b=Bb/CJv9Tt8n4Z1PYkqixFtdzwLn3Y0wo6adnGUzK+4yasVWinY0TaUjkKmsyZ8D7m2 meBQIQnqWX/Ij3RjBFX4YQ5lu/p4aUYhzEgAI3J1vTW5YCpSsPKt7B4KXHt2gpPZ6UCV SeE2R7bCW2JSKHc4X3/4Gq9Py087m1wkAXo2xkl1We+pj6cUKsJS1eQbPP1ur9RpSlJS Lh0OkKwtuR6OexzpsHC+8F0hQDkD6CoJ5Ggf1vX0U/199ehtgf3NtYStVfgDvx7e3it/ vU3bK5ijG0oz5wed3k7phI3rSj8sH/TnE33+tmkmhD85qiv9FA5P4ZCEdIQAgc6pMKbc 9mRg== X-Gm-Message-State: ABuFfogYRibs/0pRFg3cYD87bhfC0M+d0Fi5dN3J6lPHXxxBMHSg0Q/N 5fZWppJAGM314kzG5tfApW0= X-Received: by 2002:a63:1d10:: with SMTP id d16-v6mr7956068pgd.228.1538545186776; Tue, 02 Oct 2018 22:39:46 -0700 (PDT) Received: from E570.localdomain (c-24-21-68-121.hsd1.or.comcast.net. [24.21.68.121]) by smtp.gmail.com with ESMTPSA id p1-v6sm504458pff.128.2018.10.02.22.39.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Oct 2018 22:39:46 -0700 (PDT) Received: by E570.localdomain (Postfix, from userid 1000) id 5E62D1643D0; Tue, 2 Oct 2018 22:39:45 -0700 (PDT) From: Lance Roy To: linux-kernel@vger.kernel.org Cc: "Paul E. McKenney" , Lance Roy , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , devel@linuxdriverproject.org Subject: [PATCH 02/16] hv_balloon: Replace spin_is_locked() with lockdep Date: Tue, 2 Oct 2018 22:38:48 -0700 Message-Id: <20181003053902.6910-3-ldr709@gmail.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181003053902.6910-1-ldr709@gmail.com> References: <20181003053902.6910-1-ldr709@gmail.com> Reply-To: Lance Roy MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org lockdep_assert_held() is better suited to checking locking requirements, since it won't get confused when someone else holds the lock. This is also a step towards possibly removing spin_is_locked(). Signed-off-by: Lance Roy Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: --- drivers/hv/hv_balloon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c index b1b788082793..41631512ae97 100644 --- a/drivers/hv/hv_balloon.c +++ b/drivers/hv/hv_balloon.c @@ -689,7 +689,7 @@ static void hv_page_online_one(struct hv_hotadd_state *has, struct page *pg) __online_page_increment_counters(pg); __online_page_free(pg); - WARN_ON_ONCE(!spin_is_locked(&dm_device.ha_lock)); + lockdep_assert_held(&dm_device.ha_lock); dm_device.num_pages_onlined++; } -- 2.19.0