Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp979584lqp; Fri, 22 Mar 2024 01:37:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWroD0N9uHuKJ1FdUBM8epHoG9ZI745Va76eEF4KxjAIO5bU8Z4x3+zFSnf55lDbFwyBWa3fXkD9qRvuzOBMZ2MfHfBdismeB410XrqRg== X-Google-Smtp-Source: AGHT+IE5duhSypXtbkcbECvNf+S1iuExvDkk0qH7d0Mt5fkpqfqCBgUfQa4gXtPu5jN58t7TDM5d X-Received: by 2002:a17:90a:a590:b0:29a:72bb:439f with SMTP id b16-20020a17090aa59000b0029a72bb439fmr1835329pjq.11.1711096665572; Fri, 22 Mar 2024 01:37:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711096665; cv=pass; d=google.com; s=arc-20160816; b=qcWh3Hkp0NhOM4OhqDgYqaq5MjKogFVCaeGybAD9vQwCRoh3686fmZsgv4/etKQJ48 5Wh49gNAARo63z2CV7CJ+eOtpBzJ+0wmTjMj2hT+v7VwlJNcALeiALu+BY+NKZkTm9JX VEVHgGzj64YRrvavcFFKkoYc2reGjEoqG/cTLaghb0dHD9ogOqN26KjB6TbfXpnGrVBN 2/FDhFc9P4zBImdWCMYrp+Y60McTWPmF166Y6FYMbtl/VxymozKFATJ48LQSnjnQ7gZp gBN/J70q6DdxK98YHP5wKDeFVw8xQ2d8NMATUtft/exTdmmo4kwoDu3ow+CBS9w3jNyY K3Zw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=R1OQtnh64xl9MrWkPZdL6QeNOkhw3aaTLSRXVdWp5+8=; fh=CTFdFrbtP7Z7TCdMbqsgkrQi425Yz+qx6YS+cHHF8Sc=; b=Kux7nJsWkePv2gHW8twzrOBtYWr8x/zjOCHrTeinbsNy6dMv4XcjoNnVTP5jXybxO5 NKrzubnoJMa6HPC4DKDI/hA3cEAMQUTot/kRHJ3ykWq1Q/8lWvF3x7iIh+NbW9SaLtNh 2qzNU3a0MDew8CcS28UWUVT1EpPzUoVw+2yCeJHWG7t7Ruz1ynRQYYUNkW3StKYsnDj4 Endk+Ad0IOkGHwdzprIprPjWz5NTwfaR9ij2ss9KoaZUj42XBIjeJOxbMxqbmP+CVYFu PETYX+NMOEQlxcq293hTgSGYp1V/phhnNf1mJVg4FLDRFwvIRWsEQ38BR0EndSSl+hbP zJgw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PhuQzHg2; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-111143-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111143-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id v3-20020a17090ac90300b0029baecef0e0si5203692pjt.27.2024.03.22.01.37.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Mar 2024 01:37:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-111143-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PhuQzHg2; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-111143-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111143-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 37819284645 for ; Fri, 22 Mar 2024 08:37:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 975B23F9F5; Fri, 22 Mar 2024 08:35:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PhuQzHg2" 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 C1ED83F9D3 for ; Fri, 22 Mar 2024 08:35:12 +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=1711096512; cv=none; b=KmtUu2aZvoaJ+oO5TyZMhznrWS85i2x7Jk6B3VkrfpwTZ87ERbZDO+I2p0hLeMkCkkJKcbyC5YgS7RSr/s/E8qTvwIcRLOUIu3OdDFSNOXKuxMA05md+e8fLf76xh8jur0Yjw5spuaNs8tSG6eVyBVO5oNWNlWbwTcQVP7AGXJc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711096512; c=relaxed/simple; bh=S+tu/Us/naajLYwRUmTRqpD4Xo/mrCDuxEPxhqR6e8U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AGsFFtG1jRDdX87BC/DRYCB4fMn39e9pN9QzC41JOFEZFeNzR092yquxKhnVsFbFPs0ma7Q7+daWnzE61qWovnOyhuQNUX1KvwNFFFcf51DYf/vprC9OzqLMMyA+8j3qMfJDuPvL2LFRyUWYCCCLNdGZfGWXkc8gfwBiU057Te4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PhuQzHg2; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 25DC7C43390; Fri, 22 Mar 2024 08:35:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711096512; bh=S+tu/Us/naajLYwRUmTRqpD4Xo/mrCDuxEPxhqR6e8U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PhuQzHg2zIDfH+NNdpucuHBPSFDXUngQkMtXneTPOFB3EXsUgkeeJH4rsslCkfhG5 4wFPvYbHSCE1xnudBCQq/bBl6/P0nYNJuw0bYM9e5eLZxxb+YECPnd20i5Txxb4zKs gGttqYPNlKI/hzAMzVxPjsOAuaBXmXgrApgVatUr4bxEiDjBVgiiVca6abAnh8U2g7 k7CNbcR2g5fpVxGiJbyhueHZGdKDDJIz8FplT+V78W6m8/Vb9yRVw27y5h1+wbwVth M0199e2qvjbnu+xUqBsqOJYP3AyHoE+7ixgaOs8916eariT5tsdciqmT0QRoiDGDPy kyPPjQTt5vogA== From: alexs@kernel.org To: Matthew Wilcox , Andrea Arcangeli , Izik Eidus , david@redhat.com, Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: "Alex Shi (tencent)" , Hugh Dickins , Chris Wright Subject: [PATCH v2 14/14] mm/ksm: remove set_page_stable_node Date: Fri, 22 Mar 2024 16:37:01 +0800 Message-ID: <20240322083703.232364-15-alexs@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240322083703.232364-1-alexs@kernel.org> References: <20240322083703.232364-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: 8bit From: "Alex Shi (tencent)" Remove the func since all caller are gone. Also remove the VM_BUG_ON_PAGE() because it's not applicable for a folio. Signed-off-by: Alex Shi (tencent) To: linux-kernel@vger.kernel.org To: linux-mm@kvack.org To: Andrew Morton Cc: Izik Eidus Cc: Matthew Wilcox Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Chris Wright --- mm/ksm.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/mm/ksm.c b/mm/ksm.c index d7c4cc4a0cc1..136909f0c5d5 100644 --- a/mm/ksm.c +++ b/mm/ksm.c @@ -1094,17 +1094,10 @@ static inline struct ksm_stable_node *page_stable_node(struct page *page) return folio_stable_node(page_folio(page)); } -static inline void set_page_stable_node(struct page *page, - struct ksm_stable_node *stable_node) -{ - VM_BUG_ON_PAGE(PageAnon(page) && PageAnonExclusive(page), page); - page->mapping = (void *)((unsigned long)stable_node | PAGE_MAPPING_KSM); -} - static inline void folio_set_stable_node(struct folio *folio, struct ksm_stable_node *stable_node) { - set_page_stable_node(&folio->page, stable_node); + folio->mapping = (void *)((unsigned long)stable_node | PAGE_MAPPING_KSM); } #ifdef CONFIG_SYSFS -- 2.43.0