From patchwork Wed May 17 08:58:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Zhang X-Patchwork-Id: 95117 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp992351vqo; Wed, 17 May 2023 02:21:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Xb5QjEYKeWx5y+8blD7tJZCajLY1BOeT7G0LVVZGj6yFJKt3p4nMycFPmMm24QJT2q0WQ X-Received: by 2002:a17:903:64c:b0:1ac:3303:daf5 with SMTP id kh12-20020a170903064c00b001ac3303daf5mr40410048plb.27.1684315262147; Wed, 17 May 2023 02:21:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684315262; cv=none; d=google.com; s=arc-20160816; b=MNbz7/eclwKnBZ8UQGUXONzAf1ZKot+N+Fcnl/XXz7vZOFl13Cy5rSYE5BE2mXG3me RY+Lks0EUqn2Woo7YD5yfdYPY86QthWWvfUFoh3trJE3HMl5jLY0loJtGAlATTUG9fFz sBA4KVhiqV+aoHzAnftDr8aWse1YeK0vWoxWyQmZ/ZZqQfP07nH32hg41XRsLdY9aDyX hr5SDdM9jb8MypZLlJ2eLfKSOJVMaWJ1z1DA2L36Xw4pyZ1gFYNotf5YGDbG31x3RYGY JxHvUFecdVPFyYGCWW4D94o2f55/cAq9n6IymgUBwiKoc3cUPtUSi2ZuTA0FJQI+FGNY NIBg== 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=JHlXin2w6vavc2+J7pEpRe/GvVWd1HUUirBvk9ov2Fw=; b=OfiDsqwkDGhDWMnhyzVmNxH4KPquyYJb/9dVVzz2RFV77XDT30l8ntd3ISohtIy7oH bxCnrQmZKte/y8R7Z5P2/v1w5ibCRAZq6h3mZywz+xy6VzwXd9hV12MsVgHKbr1XKqDx FtsrJtnGhKo780Nzc6V5N1XtZYyOOTHUr0dW83Ou4g93S7dF8k/gIOZghKkmwwt9FSPI YBoXk6hpDhRwNljYgc4rRlH2GKc7TFG7o+OM2a1a/ppoe2ByH0LC7c61kFcaOyPj7MhY gcz1w+YGVx/9d4gc5GHr+hghlTjQPzCaJrP8utoASODsqBU+mG+v6yQM1y2YgeBu6PT/ mcqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=H+MW+AUW; 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 q6-20020a170902dac600b001ac75cbde64si22422728plx.622.2023.05.17.02.20.47; Wed, 17 May 2023 02:21:02 -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=H+MW+AUW; 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 S231229AbjEQI7e (ORCPT + 99 others); Wed, 17 May 2023 04:59:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231179AbjEQI7V (ORCPT ); Wed, 17 May 2023 04:59:21 -0400 Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BED946BD for ; Wed, 17 May 2023 01:58:55 -0700 (PDT) Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-643b60855c8so468878b3a.2 for ; Wed, 17 May 2023 01:58:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1684313935; x=1686905935; 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=JHlXin2w6vavc2+J7pEpRe/GvVWd1HUUirBvk9ov2Fw=; b=H+MW+AUW5biA2FNoD0LhWFVRD42pY2bqjWAmvKM0Yoa4zTu8srZy/Gj8H/aG3FvJL/ PA7sqqD+P2gUrAnlcsVHplTZl7wgbKAwHdTslukWmxEbgOXjPNvl10Imxfu9KOfb40wV kDTXMdOHxMgcLMLVn0uEGcjpaDT7ki5Q4pHfq/86IbfqVFgUdd0aXxibTk7EQxs3FXfw Ft/AS4NL32YXcLAJ1KSYOVm/6/qDeLSjmWKXoqRugkYoN74YskuK9j1WX96iwuHAN6EV tX08aUTLefRpOaQIL+Ad8e1kQkrnhOc0fhXJVRy2BGulNjX5fRt6fSezcJyZUWd9vLcM LL1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684313935; x=1686905935; 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=JHlXin2w6vavc2+J7pEpRe/GvVWd1HUUirBvk9ov2Fw=; b=WyhM/h+E+zrxQnRtr47+V3T0JGPUiIt0/5a+cQJCn3K2UaXN+At7/ANPGQhhPW9Y5x qSy9lZPyAQJqDnt9Xx8v2zpYZKWQml/u0nWXlnnz4kNfQUULa124QJPeMSQ6m8WvzNQf WgdYiP9xjTUHT40gLtRoSrTUZ0LfouOuZxVsogedQXvOX0XlZwBnPU44YQCcHQeBRolU Faap8dnAeu94GiD8VFFRGmG6J01EBCHiHbK2JbTMzfEb40IhlmXGkTp5LsxE/2zLXRtL aEu4gL8J6OlWnHI4UwOjIrdj0Qm+G9xmfZF0KgnacwLxQmOc1ukzY8vGCY8qBnJyRFIc 9qFg== X-Gm-Message-State: AC+VfDwb7ydtL9U5l1NIcxlBplow/T1rAa+6lnHmdu8YxChLaVgbCQ3T HTh6tab06wcuFqh3JFa7a58RTQ== X-Received: by 2002:a05:6a00:1a4e:b0:646:2edb:a23 with SMTP id h14-20020a056a001a4e00b006462edb0a23mr135673pfv.1.1684313935021; Wed, 17 May 2023 01:58:55 -0700 (PDT) Received: from GL4FX4PXWL.bytedance.net ([139.177.225.255]) by smtp.gmail.com with ESMTPSA id m18-20020a63ed52000000b0052c9d1533b6sm15056765pgk.56.2023.05.17.01.58.52 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 17 May 2023 01:58:54 -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 v2 03/10] maple_tree: Fix the arguments to __must_hold() Date: Wed, 17 May 2023 16:58:02 +0800 Message-Id: <20230517085809.86522-4-zhangpeng.00@bytedance.com> X-Mailer: git-send-email 2.37.0 (Apple Git-136) In-Reply-To: <20230517085809.86522-1-zhangpeng.00@bytedance.com> References: <20230517085809.86522-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_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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?1766132560567523641?= X-GMAIL-MSGID: =?utf-8?q?1766132560567523641?= Fix the arguments to __must_hold() to make sparse work. Signed-off-by: Peng Zhang --- 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 c8176f360dc2..bec9906b0c8c 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);