Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3871701ybb; Tue, 31 Mar 2020 13:48:07 -0700 (PDT) X-Google-Smtp-Source: ADFU+vt0B2yPcP2r+Cqftl8hnDQ6T6PE3mIF77SJ8NuwcV6QxdeFRdHJRm3ciZ+qhI6C+mneksYi X-Received: by 2002:a9d:b8c:: with SMTP id 12mr3043130oth.205.1585687686973; Tue, 31 Mar 2020 13:48:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585687686; cv=none; d=google.com; s=arc-20160816; b=VGw3tC85L0qNwxQGaZ9gwdU0lTAa/LeG89fJLwWHjWS0FIiwfKk0eDecqL/TpHXDC/ HOdZXoqAfocE2b3FEFp0fj5j13T0e236rV+I9iAiPUmgEmsxZlVL/nmZqudMGs9NB1Hp cdBANYhinApepOPEmckvhg+m/ZfcwD3vkoWhTChMIIVbKlPX0N09dvkWljPMO+3/D6pO FyRRcXGxPfkYXKNhI983E+HIeMWrHOXN+cgL9VI6XcvrQQEzMuuq+mZfIL7s4LGvFJO4 +FkICnEhU9uFkh1Ahmb4np3FdYI0SKzgxHODQBwKQ75K5G7Dzewg9t3RLF/ZqLNzfuQV XZZQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=x3+lEy9Ryrh8ACNbjDPXJdFtX4Fu6xIuZ4HubjkFKpo=; b=j8ccmbRNy8zGHrZj1zoxNGuJOdJQO+XfOeiLbtI7NHoT08upcIot5hG3ObhKqJEeHZ oges4H+O+hxFgMM09YNl7r1LBRMwOzsGvf4DE/dt9J0ZPeWrZDT1dI7kPrO030VS7G/T Mwubkxi4SvHQdtE5rvDgpWFPCdIucXHZvE/uRczpTeMJLXow0a2xwPjkwmO9UI0oBUok wHikEPDXvvdDlS80m/CT40oxPCiZytZ3Ar5QwpXBOPDvdIqzYKMheFqYI0oWoQoi31L6 RjFxCZutml25n5bVBn/FKOCuAx5VXU2GXnAkJZ5wOcP8ddkshk7u/86kwByPujUkOhOB +wRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KQyyLjlz; 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 t6si25850oib.255.2020.03.31.13.47.54; Tue, 31 Mar 2020 13:48:06 -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=KQyyLjlz; 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 S1731384AbgCaUrW (ORCPT + 99 others); Tue, 31 Mar 2020 16:47:22 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:55493 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731335AbgCaUrU (ORCPT ); Tue, 31 Mar 2020 16:47:20 -0400 Received: by mail-wm1-f65.google.com with SMTP id r16so4076344wmg.5; Tue, 31 Mar 2020 13:47:17 -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 :mime-version:content-transfer-encoding; bh=x3+lEy9Ryrh8ACNbjDPXJdFtX4Fu6xIuZ4HubjkFKpo=; b=KQyyLjlz62hMvM9CIRENXWHI+4qBvlyloYBG9pix8nl7FO9SFhpFfXI9gduV0S4gHU YMywHck7wDMBVK9zkQlEWjqzKnVLxXT2fai2IyaF225SH69eecpJ62kS0rDrwXEBRL5o +YYmpUS4nq9mGu6ZmNSj8V0YY0T+f8uOBJ8Tqll5GW3Rm3SQ/kLjEs4eFoejUGu2dOYx PBmQgQzmXk3Bp6BuvBkOHbcnVHVQKSXi1BQtsT/xuC5dBif3EG/HocaV1s4q6flEWwty tSjCEWYQXKeuXHXvZ6mjG/UtowwxhR7ctFLR4So808jHLHyC4VVIbvyNDyf/GjsuS8Gi 0sEA== 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:mime-version:content-transfer-encoding; bh=x3+lEy9Ryrh8ACNbjDPXJdFtX4Fu6xIuZ4HubjkFKpo=; b=YBLoQbGxSp4E2/xbRc8oAQsMI84l+EZFrdQNfH/gxqYWRm/MhQGP+2mfYWLgA/MhUg 81CcgSMD502IH4owx5kuwRwGQbcTtIlrMktB2uyfGcOeDLHE5MnNQ8vSuMmMgem8xGzR DqLbX20aJWlbtt5m0r8gozM+7QIQx3urGKC0U/g7j909BT/9sE1ONVXcIsIwgmzxk68Z VY0LVTipKPNAyYY4ATsHX5yNfZF/mSjyIVf0Q18tJg8IkHOardVEvLarhrz61wxWZ0rJ W4cIs4lwYQktCM5bxXVHbjSmbyZiqZ1MlG60B8NW9OQSYhGPRX1qVgm1FXwDFm8nWRR/ S0Ew== X-Gm-Message-State: AGi0PuaH7IvxpOI8vt59ANlQOTGnnDg5TXZa1JslOW2xNxsCd9HkMWAn bJbnTVC0DJ+uuhoQ1JKCYiTz+lJBn6jo X-Received: by 2002:a05:600c:2251:: with SMTP id a17mr716466wmm.106.1585687636714; Tue, 31 Mar 2020 13:47:16 -0700 (PDT) Received: from ninjahost.lan (host-92-23-85-227.as13285.net. [92.23.85.227]) by smtp.gmail.com with ESMTPSA id o9sm28335491wrx.48.2020.03.31.13.47.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Mar 2020 13:47:16 -0700 (PDT) From: Jules Irenge To: linux-kernel@vger.kernel.org Cc: boqun.feng@gmail.com, Chris Mason , Josef Bacik , David Sterba , linux-btrfs@vger.kernel.org (open list:BTRFS FILE SYSTEM) Subject: [PATCH 6/7] btrfs: Add missing annotation for btrfs_tree_lock() Date: Tue, 31 Mar 2020 21:46:42 +0100 Message-Id: <20200331204643.11262-7-jbi.octave@gmail.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200331204643.11262-1-jbi.octave@gmail.com> References: <0/7> <20200331204643.11262-1-jbi.octave@gmail.com> 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 Sparse reports a warning at btrfs_tree_lock() warning: context imbalance in btrfs_tree_lock() - wrong count at exit The root cause is the missing annotation at btrfs_tree_lock() Add the missing __acquires(&eb->lock) annotation Signed-off-by: Jules Irenge --- fs/btrfs/locking.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/btrfs/locking.c b/fs/btrfs/locking.c index 571c4826c428..850fae45a8a4 100644 --- a/fs/btrfs/locking.c +++ b/fs/btrfs/locking.c @@ -410,6 +410,7 @@ void btrfs_tree_read_unlock_blocking(struct extent_buffer *eb) * The rwlock is held for write upon exit. */ void btrfs_tree_lock(struct extent_buffer *eb) + __acquires(&eb->lock) { u64 start_ns = 0; -- 2.24.1