From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6CD8BC7EE29 for ; Wed, 24 May 2023 03:14:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239358AbjEXDOW (ORCPT ); Tue, 23 May 2023 23:14:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239306AbjEXDNu (ORCPT ); Tue, 23 May 2023 23:13:50 -0400 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 413BD196 for ; Tue, 23 May 2023 20:13:22 -0700 (PDT) Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1ae3f6e5d70so4043985ad.1 for ; Tue, 23 May 2023 20:13:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1684898001; x=1687490001; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EQslJb4TTQ6f3QnMShcvH80xJECcy+dWiloGaRtjezU=; b=i5/jXr97UIsdHU5etmogFyDj7C2w+qodiIstyuPmozbpYtvlWbpyrBC35aIkuQPKWz T48K+vdaW1bxGnZvnRg3yusdz1FeUyYztH5umoQf7+8NEMw4B70AsUa9lwjGJYLS1KMr 5Ak8I4VJpurMBrvbJKEHCdlTz2Ij4qCE92GL/Kr/B+XuVl/EtInaS5I7YIVMjD/yRqwM 26dxR3Xnoyt5A9f+asTG065uQc/ezFzj/1eGgwED/64LZk6iQWjVzpyw/nwBX0xtIa8h rnd7xldyaw6azZ//jr318c0sorc90X5wtNPgLeeRyjjuIuzWAOFrLzqSi4N2GmqsSyxO wRkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684898001; x=1687490001; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EQslJb4TTQ6f3QnMShcvH80xJECcy+dWiloGaRtjezU=; b=XsNWVHMSygtFNT/Z3AvPOOn5VwW3CYjRFka5KHmMzn8okoD3rGCKyxF+LZVjxH1pau yBgbegB6TquMc8C1dZ902YT3UqsCVae4bmmhF/QRmnu+XZ9NHyjG9hhpfSonXndbPlOx MxKkNpdZDg1eP79WOerwcEx9OzB6cfUoiVbdBIfTF+HDXKhuSuqnKL7UHRgtaPvXa0qY MeSUlbrOl2YcxnrGtinuG0sT+sCnFdJAbiyss2h26TfopgrRRvcBbu6s/xixDspG9l1t aFOLjQPW2iISjLWcvvyIvPZly7cuJa+maGoeWjjnSqHWBZbarQHlEqr/9BIs5GlNSfip Kkug== X-Gm-Message-State: AC+VfDwbduP9izKJlwQrwy4ECCmgdN8GTzznWdg5tDrdBHdZhHyQeK03 2WBotzMZbAWMpCSvvXScI96jqA== X-Google-Smtp-Source: ACHHUZ5qQNihL3luGXrPNDdY/XEvLixGhNnqd1Xi3kMKq3IJz6WAsLBV2qTKgrCJTB/k05AHToVxbg== X-Received: by 2002:a17:903:11c9:b0:1ac:750e:33d5 with SMTP id q9-20020a17090311c900b001ac750e33d5mr21405280plh.15.1684898001677; Tue, 23 May 2023 20:13:21 -0700 (PDT) Received: from GL4FX4PXWL.bytedance.net ([139.177.225.249]) by smtp.gmail.com with ESMTPSA id i4-20020a17090332c400b001ab061e352bsm7480769plr.195.2023.05.23.20.13.19 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 23 May 2023 20:13:21 -0700 (PDT) From: Peng Zhang To: Liam.Howlett@oracle.com Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, maple-tree@lists.infradead.org, Peng Zhang Subject: [PATCH v4 03/10] maple_tree: Fix the arguments to __must_hold() Date: Wed, 24 May 2023 11:12:40 +0800 Message-Id: <20230524031247.65949-4-zhangpeng.00@bytedance.com> X-Mailer: git-send-email 2.37.0 (Apple Git-136) In-Reply-To: <20230524031247.65949-1-zhangpeng.00@bytedance.com> References: <20230524031247.65949-1-zhangpeng.00@bytedance.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the arguments to __must_hold() to make sparse work. Signed-off-by: Peng Zhang Reviewed-by: Liam R. Howlett --- lib/maple_tree.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 263bd0ccc31b..3fe6a6685384 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -1752,7 +1752,7 @@ static inline void mas_adopt_children(struct ma_state *mas, * leave the node (true) and handle the adoption and free elsewhere. */ static inline void mas_replace(struct ma_state *mas, bool advanced) - __must_hold(mas->tree->lock) + __must_hold(mas->tree->ma_lock) { struct maple_node *mn = mas_mn(mas); struct maple_enode *old_enode; @@ -1792,7 +1792,7 @@ static inline void mas_replace(struct ma_state *mas, bool advanced) * @child: the maple state to store the child. */ static inline bool mas_new_child(struct ma_state *mas, struct ma_state *child) - __must_hold(mas->tree->lock) + __must_hold(mas->tree->ma_lock) { enum maple_type mt; unsigned char offset; @@ -6204,7 +6204,7 @@ EXPORT_SYMBOL_GPL(mas_erase); * Return: true on allocation, false otherwise. */ bool mas_nomem(struct ma_state *mas, gfp_t gfp) - __must_hold(mas->tree->lock) + __must_hold(mas->tree->ma_lock) { if (likely(mas->node != MA_ERROR(-ENOMEM))) { mas_destroy(mas); -- 2.20.1