From patchwork Mon May 22 05:06:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Zhang X-Patchwork-Id: 13249768 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 47F95C77B73 for ; Mon, 22 May 2023 05:07:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DA53290000E; Mon, 22 May 2023 01:07:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D5514900002; Mon, 22 May 2023 01:07:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C1C5590000E; Mon, 22 May 2023 01:07:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id B3C61900002 for ; Mon, 22 May 2023 01:07:30 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 8270F1A06CA for ; Mon, 22 May 2023 05:07:30 +0000 (UTC) X-FDA: 80816707860.30.F63DC9E Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by imf21.hostedemail.com (Postfix) with ESMTP id 9D52D1C000A for ; Mon, 22 May 2023 05:07:28 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=bytedance.com header.s=google header.b=EzLSK3cP; dmarc=pass (policy=quarantine) header.from=bytedance.com; spf=pass (imf21.hostedemail.com: domain of zhangpeng.00@bytedance.com designates 209.85.210.170 as permitted sender) smtp.mailfrom=zhangpeng.00@bytedance.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1684732048; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=yWC57VvLqW+uV6e3VSW20kWo+uFlFhqhxKDmqi/M+s4=; b=q64FTgi5TJQgcHuHZ0TIE8F4V3C6OGdBoWXKFf1wDUDeWggKaSqXzVj1WU2E7S6IDkUPma Vb5uc71AERwc1LAexyoj22hRbrjpe//nadhsUjgIyPjTd+i+vkGvYCqFWnobL4kx3VThxm bm1yIgMRvE7X1JLTH10yneZBjG9i2/s= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=bytedance.com header.s=google header.b=EzLSK3cP; dmarc=pass (policy=quarantine) header.from=bytedance.com; spf=pass (imf21.hostedemail.com: domain of zhangpeng.00@bytedance.com designates 209.85.210.170 as permitted sender) smtp.mailfrom=zhangpeng.00@bytedance.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684732048; a=rsa-sha256; cv=none; b=fDsb4fLAoH2RqO2S+pN/sWkWXEbn8xfPqSJ+UPNuwkkrK6H2iJxsC2or11fkeZJQuFY33x 0vrdxjLut3yTYyMWugQPZn9rrL8uEqdmHhHjMuJ455WU24a8nAieQQMVyH0LtOnQW755DM 6yJLz+nxA4YbQ4mkcmk9UAA0zfbIy8Q= Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-64d3578c25bso3205157b3a.3 for ; Sun, 21 May 2023 22:07:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1684732047; x=1687324047; 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=yWC57VvLqW+uV6e3VSW20kWo+uFlFhqhxKDmqi/M+s4=; b=EzLSK3cPy7whK/cuCX7ItKG6l3duMlUzxr2DN24N10lVm+CaqC7sQkl4JBdNua/aAQ zosKFg/rfFI7osQ8eZcIBIfKeDR03YZaXjE5O8+e2qadCDIp41XDnirHuK3FWoX8l3OU YcB4YJkxwNjDyYKJfPZHybJrX1aMBiy3UgCgsQoNlOLNB2szntp7ukZGP8Q+ZzNCsuPy V8JNyEch9NnjoH7EK7OtuSW0wVEcwlYQnqPEa9kzxzg0/vxd+qY1B24BapLesnKT1O6q iZbG3O4pP7gdt6Vx0E2R3HvXJKJDMX0BbBfYhgm7SDcOeyERTF0Kb1Cj892QnkPDOShu QbmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684732047; x=1687324047; 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=yWC57VvLqW+uV6e3VSW20kWo+uFlFhqhxKDmqi/M+s4=; b=G98+r2s6aDQI//90aXEBVGuwPlh+6fGMmyrgJK0pvX/Q6lT/6dibr+3zb9GOImusRP XL9jcid7bUIIkjjjz2nicOLvoITYI0CrgN8r/UPUgllcyRgKmk63GWnIwnf9TiniMCeR 6kdWXfwa+VJs4F/JU3pG5uZh7u1OfllMfMy34wbOmmBF/RxVe8jyxyxV/qhEnMB8G0Lg ERpa17WSaohnSoCwoleA2e+HJIjZb9HAFAiGeFAynPWzUoW0C1BtNnjD5k/snLDug2HM wwBEnA1Thnt3ADwnuye3I/TItNajQO3FlZWiGMiw42hgXdvf6CecYjX2dXovbISOSH2M 2dJg== X-Gm-Message-State: AC+VfDwh8OFiW7ORFVLAMF4Y3Nn1+aAb67sNcrbF1rowzz46kX/e4eRy DR974xGN7EQLmQ7Yp2a8ceBlFg== X-Google-Smtp-Source: ACHHUZ78HzvmR367cMVPT2DzYVrIahGxjmoDH/aFdaP1ySwjC4sDSZwePIHcLNsfO8g2Nn/oaa1aBw== X-Received: by 2002:a05:6a00:3924:b0:64d:5f1d:3d77 with SMTP id fh36-20020a056a00392400b0064d5f1d3d77mr4573175pfb.34.1684732047342; Sun, 21 May 2023 22:07:27 -0700 (PDT) Received: from GL4FX4PXWL.bytedance.net ([139.177.225.249]) by smtp.gmail.com with ESMTPSA id t10-20020a62ea0a000000b0063b5776b073sm3247519pfh.117.2023.05.21.22.07.24 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 21 May 2023 22:07:27 -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 v3 03/10] maple_tree: Fix the arguments to __must_hold() Date: Mon, 22 May 2023 13:06:49 +0800 Message-Id: <20230522050656.96215-4-zhangpeng.00@bytedance.com> X-Mailer: git-send-email 2.37.0 (Apple Git-136) In-Reply-To: <20230522050656.96215-1-zhangpeng.00@bytedance.com> References: <20230522050656.96215-1-zhangpeng.00@bytedance.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 9D52D1C000A X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: n7pitmn69bp37prmetbphoakadyoy9dj X-HE-Tag: 1684732048-294002 X-HE-Meta: U2FsdGVkX1+AtpueW9E/WK9kiGp7JHRhMAYl2sDIXBP0yC8hiAL7zW8+WwsCbokPZsM6PIipXZfJSh9yuUURQz8xtbZ4A05RoI8EGM4OS2NwwJVRpx6N/ORwgq7gGuZ8S99LljSwV/7D9SWJvqe54e0BizjT86xmmAaDq8X7osc2xa0Ls+71bkUIOE+ILt6jJn+LT+GZ53woT79F3wfRVx7Q8ZFV8HwZyXyKSTMkvpqbapFhwXnBi1MONAAGN5XMjtIPIwgPb9JeDsx9Y1FrZpBi1hoUVISloLu3MggAVu2gTyjhTHCXKQl3hmzxIgWZqQsN2DHWfnOFYXa+t7RU9bHTqej/HOZgugPReiiWNDJSerG8ujTA+mX8SG6ebqwrNqTzaIWOvLjyF+/1n9zXjHeJ0PlQHdx6yPVn/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000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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);