From patchwork Wed May 24 03:12:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Zhang X-Patchwork-Id: 98259 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2564954vqo; Tue, 23 May 2023 20:16:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7nQt2ylUIhLl79hqiGqod5x0fmwUXCK4pbi66BPGOOWRQLfomDGKKpL/MyqR3eCP1HNRrb X-Received: by 2002:a17:902:e746:b0:1af:bbfd:1c07 with SMTP id p6-20020a170902e74600b001afbbfd1c07mr7624039plf.57.1684898193919; Tue, 23 May 2023 20:16:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684898193; cv=none; d=google.com; s=arc-20160816; b=e2tZbjtP/UODWx6qA/S3Lw73fPgbziJrSgT/zBx1LdUVSz27QmRcKLsp0qKWg0LA5l 3AQ79bGGUzHtd3xjsVBajlvgXjg+X5I7RWx9s+l3J1CsagojpNVhKZsOq1+84e9L/nfJ futVxzopVojdWEVPx1QC2U6bI38e/cYgJLhOb+U8Hq4MGZAkIkqSqJy4+A+Ad6Y7Xz7H aboIgDv/IKyrMpuMRWH80k7YbVAcU+AZLnpjVxnrGIWm/uhaT0ZsRtvmbhHEoxHJ1lhn 35giRhxeCUEK4aqrKtsN60aekLsGjIo0NQjWyoXZ9IHIjSk+yq/rUQdo2gpjBVKc9kYI YlTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=EQslJb4TTQ6f3QnMShcvH80xJECcy+dWiloGaRtjezU=; b=NJPPH+XoZca7aH6+YmjCTRIIn54wOXq/fbk6/xW6D4eUkQEO0Fui8PlDUcWgnusH9J e2VUmlsFJHDnRrpMLb8COgP948bodn/a30oJFbr4LYqUMKWS9s4XkI3SzHN1GGbc+W/1 RcRIGTRQsmcSFnPpIWZaLCYI94qNZe8woZv32JIJ0JnFLlf0hL/LA4Ra7M4ZwUOamOO2 4gn1K+zy7bWwwIegq7yHlPStKepvnbBm9JdcyX20Zzf6rkEL8TgfCzZB54Q5JnfK7x5o goZR/nncasc6K2QF8XL/zpOGthIUbeLJI5xNKeIN+7bT75c+4KvmfGYo3FCPepA5A19U 5Q5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b="i5/jXr97"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x18-20020a17090300d200b001aad6d5f016si4623528plc.536.2023.05.23.20.16.20; Tue, 23 May 2023 20:16:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b="i5/jXr97"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239356AbjEXDOV (ORCPT + 99 others); Tue, 23 May 2023 23:14:21 -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-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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766743808137408269?= X-GMAIL-MSGID: =?utf-8?q?1766743808137408269?= 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);