From nobody Sun Feb 8 17:37:12 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CC7CB74077 for ; Mon, 8 Jul 2024 06:29:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720420188; cv=none; b=s5mYP4TZvJrY04s9PdpQNzGjvfWmrIA/A9bVJatVFJmj2oGWrpCUwTsS6g1vmT9ZcZwqVe8zDc4ohx8ZWpCwkkexI46uJTvo41nuAODvmPGDrw9P+ZSyLeUH9Bm8w0akjoVcdKdhz6Fufb01Go/0HvsggnijYipDwJL5wwEA9Ac= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720420188; c=relaxed/simple; bh=H24xLCJMLoMGxtoL02JioPie/ckhzBt773ZzPhU2CSg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qtw3ThVeAkKa6Zw2A4RjZbkOphRJITCaZnKHajWQhJwLY84dMP40Z7YPONbIoKKICot7ntorNuskJ1noHfJdmIYhaSKB10YfA4KJP+ONM4y8IROeoeFmUVWF/YQxw8qQlWhYY7jBMtdGbxta+CyzytSU71SoJYw1Xbu3SbSjMH0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jWOtxdXd; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jWOtxdXd" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 66EF4C4AF0C; Mon, 8 Jul 2024 06:29:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1720420188; bh=H24xLCJMLoMGxtoL02JioPie/ckhzBt773ZzPhU2CSg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jWOtxdXdW3pAl2WmrOj1bOnrw+gHOrlhH3zXwNH4eP7cA0yNru3LwOhi4tzn80Rbx cVD76ITdy6l5ySTmIFusfFSQBHDl8J2VB4jbf3A54xhBGhKvlLpl8LWFsbDN6yqiiW s2n8BudgTiO2TsxYnXK3NQY9OpoBTNB5iGwrGOdRxzmGT8ouZKbT+91GBd49d5aNq4 l09v7kThk+LyOa6yi3Rt5tTRG8o5GcSjP6xGzOshEy/RdkCcZhw0faZV7UOxRLyCzt dixnOcM1H9x7wG3WYr7joJy86clgn16ANgHuJ4rzG9xZ0sTJu/7N4idkcziq+vkXnp VaalbA+QoqWpg== From: alexs@kernel.org To: Vitaly Wool , Miaohe Lin , Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, minchan@kernel.org, willy@infradead.org, senozhatsky@chromium.org, david@redhat.com, 42.hyeyoo@gmail.com, Yosry Ahmed , nphamcs@gmail.com Cc: Alex Shi Subject: [PATCH v3 18/20] mm/zsmalloc: introduce __zpdesc_clear_movable Date: Mon, 8 Jul 2024 14:33:39 +0800 Message-ID: <20240708063344.1096626-19-alexs@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240708063344.1096626-1-alexs@kernel.org> References: <20240708063344.1096626-1-alexs@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Alex Shi (Tencent) Add a helper __zpdesc_clear_movable() for __ClearPageMovable(), and use it in callers to make code clear. Signed-off-by: Alex Shi (Tencent) --- mm/zpdesc.h | 5 +++++ mm/zsmalloc.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/mm/zpdesc.h b/mm/zpdesc.h index f64e813f4847..5db4fbe2d139 100644 --- a/mm/zpdesc.h +++ b/mm/zpdesc.h @@ -114,6 +114,11 @@ static inline void __zpdesc_set_movable(struct zpdesc = *zpdesc, __SetPageMovable(zpdesc_page(zpdesc), mops); } =20 +static inline void __zpdesc_clear_movable(struct zpdesc *zpdesc) +{ + __ClearPageMovable(zpdesc_page(zpdesc)); +} + static inline bool zpdesc_is_isolated(struct zpdesc *zpdesc) { return PageIsolated(zpdesc_page(zpdesc)); diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index bb8b5f13a966..e1d3ad50538c 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -846,7 +846,7 @@ static void reset_zpdesc(struct zpdesc *zpdesc) { struct page *page =3D zpdesc_page(zpdesc); =20 - __ClearPageMovable(page); + __zpdesc_clear_movable(zpdesc); ClearPagePrivate(page); zpdesc->zspage =3D NULL; zpdesc->next =3D NULL; --=20 2.43.0