Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3871612ybb; Tue, 31 Mar 2020 13:47:58 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtydZmwhzZPvT7Ld5NY0v1UxT7ExRJNk/Ke6wi5i1kE82MKyI5Y+8/EDgwHuo5q/eTPMSbR X-Received: by 2002:a9d:247:: with SMTP id 65mr14455947otb.364.1585687678635; Tue, 31 Mar 2020 13:47:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585687678; cv=none; d=google.com; s=arc-20160816; b=DyiWxXev3cgSiKEy3sF9JPjJuyt7Yigc7dQ8asVMeCtWkkSWT7cX2XNFy6FOt2iZlh Sd9vB5PwjR0GICkjRpNWu+fmAqpbjgeXIcx5W3yWSjGP6aZW8FxZxfFrsi/R+6aVok4d wdxqRktmA1gauoRNzhT+/yGhkVqb+8ZtDbEgZn9R8y0Of2UPp0RsCWxnGA3IQmLbKFYl mzXz8RkbKEMSZBTeGT/lTKWBdFuK3MiDRCyd5dOrMRdGYGA/6jYr+ecoL8gsEPwXa3cQ E16/solk+4QBWhIV3K+4OTz+ptVfVy63x4AzeFz8W+/uzMAlCTg1XOalMekMCjhKKvEq 0NEw== 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=2hiN4D4ziicIicURcM9kTX3QBwWjTWrbPU8zupmJf9M=; b=n5tevFlhNwLEU1qTIZtJgdysB+hU8lUzbx/IePLbVf/HyOeN6WZ9xO847ANDOcRibd x0lnk9Qmia5uICPk390AhyLIgJTKUBHbFcSl7H+kbrfuw1jObfLI6VYC0nzCNRO3/4zm viBozJmutUAvqN/bepuJHHHvJ0EK21OD0kHYlqIZ9eU4TdwW8UE0PzWNCwLnFP+lCgny huJXecebz+UVweNxTdJoGeXFTFkBLJJQNumiUXi3+PhZOxV/Y4PXWznWCFZ5MJytrOYo /t7O5tJwn1M5Mfp83IjQI5fsJHS4biNljuFlkb/SGECTHVXl9OCapG/HQZzIhgMMLXEn /BlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AWJsx9HO; 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 l5si38648oic.3.2020.03.31.13.47.45; Tue, 31 Mar 2020 13:47:58 -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=AWJsx9HO; 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 S1731339AbgCaUrT (ORCPT + 99 others); Tue, 31 Mar 2020 16:47:19 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:52537 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730907AbgCaUrS (ORCPT ); Tue, 31 Mar 2020 16:47:18 -0400 Received: by mail-wm1-f66.google.com with SMTP id t8so701239wmi.2; Tue, 31 Mar 2020 13:47:16 -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=2hiN4D4ziicIicURcM9kTX3QBwWjTWrbPU8zupmJf9M=; b=AWJsx9HO8fDO/PUITUpmkPpwyy0/OjUtIsVKTIIUWVAhzn3qnZlEGSb7AOXluG+VhY ogjZMfEZcABmqsfZuTlBf/YihQemiKzjEWRhLTUSyjswFUFaGQ4FIlUpvhRz7m6M2Hdj OuHLE9JGD0LkCg9veJzqbsGNfMN3fK2o7lgMrtdzFpB6m2+Wyn/WWJ4R1qhowfUHthbv 36qt1dbziy2Br4WXblOpwz7hO+Xd+ePco1+NSHNHivS6DHMpbW/+2JmT7D84Wt99Onp2 bCVcJ6maHqb5mfOnIr3dcc0byJaT6nxq1yNabJOKm8KDB/jZfT+TclmS0lhANvyk5cSE b/9Q== 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=2hiN4D4ziicIicURcM9kTX3QBwWjTWrbPU8zupmJf9M=; b=Whej8vS6SVe1qdlp2MvQ6WobVTE0DVZhRPB5JF8mQZ66KIQADt4raXsbqOeW+T5NyW Gak2s5oDmhxi3C6BmTIK9DJyqMO2TPfpUfPiICyq3jPFPbw0PYAan/G/AsO3qz3U02DJ aN6Mryep9Z+QKsno0x1udNf8FSj2zYI51Ehv9yfFOvHzlnoSiTX/1siOXjgHqC/5F7BB w6ux+c4Y7ujD0BSH5W2DWVMT05qmvKf4qMWeYUxBSORFvIO4QkRXEaz8qT1iA206mclc oOPPMju89g96j0g9kuSVM8ojmN6jU1IUk6auXu/3uG6nl2yS3RdakRJFQrCO0GE7jO23 t7oA== X-Gm-Message-State: AGi0PuZtEoNHa34HFuCB/h5uwYX0983ef75buy5EaTXeS4zXEF8xzh49 VHXHDDD4fdtb618g/ySbsFS4lPdlvQ/3 X-Received: by 2002:a1c:cc11:: with SMTP id h17mr692873wmb.39.1585687635703; Tue, 31 Mar 2020 13:47:15 -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.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Mar 2020 13:47:15 -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 5/7] btrfs: Add missing annotation for btrfs_lock_cluster() Date: Tue, 31 Mar 2020 21:46:41 +0100 Message-Id: <20200331204643.11262-6-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_lock_cluster() warning: context imbalance in btrfs_lock_cluster() - wrong count The root cause is the missing annotation at btrfs_lock_cluster() Add the missing __acquires(&cluster->refill_lock) annotation. Signed-off-by: Jules Irenge --- fs/btrfs/extent-tree.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 0163fdd59f8f..9057a5ca6678 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -3395,6 +3395,7 @@ static struct btrfs_block_group *btrfs_lock_cluster( struct btrfs_block_group *block_group, struct btrfs_free_cluster *cluster, int delalloc) + __acquires(&cluster->refill_lock) { struct btrfs_block_group *used_bg = NULL; -- 2.24.1