Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1867680rwd; Wed, 17 May 2023 02:28:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4DPMIrP+2BW9aRaLX5Bot8Ie2uI/vloUQg7uf/gNy+iFVx/FXc/YOPk1m0axchtjCVFEKt X-Received: by 2002:a17:90b:1d0d:b0:24d:ea7f:9ea2 with SMTP id on13-20020a17090b1d0d00b0024dea7f9ea2mr41151071pjb.15.1684315723612; Wed, 17 May 2023 02:28:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684315723; cv=none; d=google.com; s=arc-20160816; b=CkxCNlkc/GA9qmTU5dIsV4i1SMosl+TwzCnvRYkwSz3QmCyUVhWXYoFZGf0VXYiK67 kAVXez+XMDNAErr8OljHOns+Xo+XBTu5GnLrah38vaSuDennR9EQSm4xVtC+zjtrzX3r /cNXO+LImfttQXrT+xZJvkw4Q6Vz3ezzIl2PX3/J51WjozZ4nTgDg4qyNdKaYbnHKIVi neN3YtieBqEA/7l5dT1dPoMHptdwrPpc8w6iuqpsb+nv98UgsZ8muHEXnwzQ+PQp02MB Y7K87q6/+7rHeotPjbsZyNC5eanIG+fstynw9dZplaxLmVXpoaU5I30m9WNhYg8oqgAo F9HQ== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pg7-20020a17090b1e0700b0024e03b1f374si1469966pjb.22.2023.05.17.02.28.29; Wed, 17 May 2023 02:28:43 -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 S231228AbjEQI7e (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 Content-Transfer-Encoding: 8bit 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 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); -- 2.20.1