From patchwork Fri Jan 6 13:59:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 13091397 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 2A38DC4708D for ; Fri, 6 Jan 2023 13:59:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 80B7A8E0002; Fri, 6 Jan 2023 08:59:12 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7BB608E0001; Fri, 6 Jan 2023 08:59:12 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6AA108E0002; Fri, 6 Jan 2023 08:59:12 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 5A7B08E0001 for ; Fri, 6 Jan 2023 08:59:12 -0500 (EST) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 26EB5A0E37 for ; Fri, 6 Jan 2023 13:59:12 +0000 (UTC) X-FDA: 80324530944.15.8757DB2 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf26.hostedemail.com (Postfix) with ESMTP id 593C4140010 for ; Fri, 6 Jan 2023 13:59:09 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=linuxfoundation.org header.s=korg header.b=rZRmravG; spf=pass (imf26.hostedemail.com: domain of gregkh@linuxfoundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org; dmarc=pass (policy=none) header.from=linuxfoundation.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1673013549; 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:references:dkim-signature; bh=+zFeiGn84QoyT+FTvkk/EqIHoXsfifsX3TIgT0Haroo=; b=D3EiRK9tRI2YePpAgCHcRaIbOyT0y9Z/UIx5IVAXtyhnOYClzYIi0vo7eidI0qNdyuYGQC /O4shkOPrF8TQCffOWFThoCYCQEELIIY+bz+jSOE2z5rqd2zbuf5ES/ndAlnlLv/g7MDEe IUctYlzsuvuNnsa/31phYq70C36CUCc= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=linuxfoundation.org header.s=korg header.b=rZRmravG; spf=pass (imf26.hostedemail.com: domain of gregkh@linuxfoundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org; dmarc=pass (policy=none) header.from=linuxfoundation.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1673013549; a=rsa-sha256; cv=none; b=KF88nsu47UI3TEGwgwvHT4n6hX1thZqjj1QI01vX4GmFAt9KByvQZR8fowOomBl6Oo0nsQ K3jGxNaMeQuG+Mv+hXpfKYWECimLOvC0mSSzY6VSTw3l5Ul60aEtlQ836/w5hMgZB2OZby 5E2NAVNtkg7KiTIizMN3NornzHd/UIE= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 26E6561DFC; Fri, 6 Jan 2023 13:59:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 151EAC433D2; Fri, 6 Jan 2023 13:59:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1673013547; bh=Ux2bGedOxwHk3RH/wvtMaN/mA8enbpkQkw8iBZv2Syc=; h=From:To:Cc:Subject:Date:From; b=rZRmravGDjgIHGpYL8H7+iEcV5MbvuOEMVon3TIbVyQdGYrjkyfitTusw3i5P/pYq 5EXS5M8Cra/DzmogFy1KyMXXcJVBInmRlXo/dKzzPZW4VKM1WhZQufzGlquu+UpmpF cZSlhUp8T47AG01ihx6U8KHw+OonIeNWhalcF//o= From: Greg Kroah-Hartman To: akpm@linux-foundation.org Cc: Greg Kroah-Hartman , Vitaly Wool , Miaohe Lin , Minchan Kim , Sergey Senozhatsky , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] mm: remove PageMovable export Date: Fri, 6 Jan 2023 14:59:00 +0100 Message-Id: <20230106135900.3763622-1-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2872; i=gregkh@linuxfoundation.org; h=from:subject; bh=Ux2bGedOxwHk3RH/wvtMaN/mA8enbpkQkw8iBZv2Syc=; b=owGbwMvMwCRo6H6F97bub03G02pJDMk7NBV3puwRKTlU9ZFV8I3M5hc52yXLBdtjqqPWJPw+E/X+ 3rPUjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZiI8AqGBUsvKC3VEFp1pHTt7RlJiX MF+r8JrWSYK+LiPrMu3mKtyiPdF3OUcz0f5BizAwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 X-Stat-Signature: 7yqo1wne81besuqtcujguriq79j9d89t X-Rspam-User: X-Rspamd-Queue-Id: 593C4140010 X-Rspamd-Server: rspam06 X-HE-Tag: 1673013549-419716 X-HE-Meta: U2FsdGVkX18qbXDqjCZnNxhxwWzyYLyiaE2HX5HOl57QhZGulkE4oRn705JjmrXZxhgT+aycDKuCP3mMb/gRJpiv8h28tQ1cnLUWcEpDzzYKuYwtKW9heJrjL0I0CltM8Ms/yIVgCly9cw63la8wz5CCYGHYlMBi4rO9/IHHzFS6Wbub/NNSi4Ro4I6N1fZmzV03oy/A7+gEucAPaeg3ASfUjZY0rz/vs6uzZBr6fwOwjLxUVEhF563kQ/2w5jq3WeuaQ13IDo23DZcOzlqk+/VsUylBv7grTbbkLqXYRrYBEJDGEDauMaqOcslJFO5rjntFV/zkb/mQeJ5yB2DKotolLwNnqXb6QaZwn7t8BqIcGVHR+ExoO74k7NoGIi4OpvslTCRB+TasxQjC5fqZw2ruhOPGrLT/kYWNIjqWD2oxpU21TamKMBKqchkmy1IqYtYc/mphDVWrd9E2dlgTKyCJvD+sCPSAnYKFvywOVfej78U+4kvYuA007/FYQwm+Qywf769umovg9p/IYgvFVZWzOq+bXQGt/j4IAFOjHk9xFoDjo8wHLTAAzLzlC03uXJqAF5l1A1Bi23z84673kZ33v6Eb7tg2Lt8TOMXI3LwPjrqr40tiJ5aa9I7aQEnRo+DnlrJyk1c2P1wtAEZwjm5KsP0ndod0fRGczu/YcuTb1aXEKjmY3aLtPWszihajMfcCMm3IlAzEwnme/aFeM6u+W0S0scNPBQg3xEd51dF+6FbspDZkubUIoqynnecviscXOdDEx3PoDBAsXFxjcU/ya2vRS2ikXUeCE+eYvd0ZIulkdPCwF805hrGJ8rEnXJSVIxoPtxd9mXbz0CmAI0lKuO9KPH0BudD6Dfc2V3kk2yAnhtrRfKgWoj2AIJR+ZW0rW7rDBH+xEey216v1pcIJTOpNN2NvZtGOkEUSpoa9+CfqDWJwOt149V39yV1t1j0lzkXXK2V008aacpi kOupUseC TjWII7oqknGIi8qsckbfv5SwUwA8INyDAFaQxEAmZoiBt/uZeFVbdhx3qFTenWJOeQ8fkkSBXZN8sMPFrlvfjSdJAsg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The only in-kernel users that need PageMovable() to be exported are z3fold and zsmalloc and they are only using it for dubious debugging functionality. So remove those usages and the export so that no driver code accidentally thinks that they are allowed to use this symbol. Cc: Andrew Morton Cc: Vitaly Wool Cc: Miaohe Lin Cc: Minchan Kim Cc: Sergey Senozhatsky Cc: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Reviewed-by: Miaohe Lin Reviewed-by: David Hildenbrand Reviewed-by: Christoph Hellwig Acked-by: Minchan Kim --- mm/compaction.c | 1 - mm/z3fold.c | 2 -- mm/zsmalloc.c | 3 --- 3 files changed, 6 deletions(-) diff --git a/mm/compaction.c b/mm/compaction.c index ca1603524bbe..62a61de44658 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -122,7 +122,6 @@ bool PageMovable(struct page *page) return false; } -EXPORT_SYMBOL(PageMovable); void __SetPageMovable(struct page *page, const struct movable_operations *mops) { diff --git a/mm/z3fold.c b/mm/z3fold.c index a4de0c317ac7..0cef845d397b 100644 --- a/mm/z3fold.c +++ b/mm/z3fold.c @@ -1450,7 +1450,6 @@ static bool z3fold_page_isolate(struct page *page, isolate_mode_t mode) struct z3fold_header *zhdr; struct z3fold_pool *pool; - VM_BUG_ON_PAGE(!PageMovable(page), page); VM_BUG_ON_PAGE(PageIsolated(page), page); if (test_bit(PAGE_HEADLESS, &page->private)) @@ -1490,7 +1489,6 @@ static int z3fold_page_migrate(struct page *newpage, struct page *page, struct z3fold_header *zhdr, *new_zhdr; struct z3fold_pool *pool; - VM_BUG_ON_PAGE(!PageMovable(page), page); VM_BUG_ON_PAGE(!PageIsolated(page), page); VM_BUG_ON_PAGE(!test_bit(PAGE_CLAIMED, &page->private), page); VM_BUG_ON_PAGE(!PageLocked(newpage), newpage); diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index 9445bee6b014..6aafacd664fc 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -1973,7 +1973,6 @@ static bool zs_page_isolate(struct page *page, isolate_mode_t mode) * Page is locked so zspage couldn't be destroyed. For detail, look at * lock_zspage in free_zspage. */ - VM_BUG_ON_PAGE(!PageMovable(page), page); VM_BUG_ON_PAGE(PageIsolated(page), page); zspage = get_zspage(page); @@ -2005,7 +2004,6 @@ static int zs_page_migrate(struct page *newpage, struct page *page, if (mode == MIGRATE_SYNC_NO_COPY) return -EINVAL; - VM_BUG_ON_PAGE(!PageMovable(page), page); VM_BUG_ON_PAGE(!PageIsolated(page), page); /* The page is locked, so this pointer must remain valid */ @@ -2070,7 +2068,6 @@ static void zs_page_putback(struct page *page) { struct zspage *zspage; - VM_BUG_ON_PAGE(!PageMovable(page), page); VM_BUG_ON_PAGE(!PageIsolated(page), page); zspage = get_zspage(page);