From patchwork Wed Dec 11 04:01:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Junjie Fu X-Patchwork-Id: 13902916 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 D1138E7717D for ; Wed, 11 Dec 2024 04:04:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C83B36B028A; Tue, 10 Dec 2024 23:04:16 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C33576B028D; Tue, 10 Dec 2024 23:04:16 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AD4936B028E; Tue, 10 Dec 2024 23:04:16 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 8C5786B028A for ; Tue, 10 Dec 2024 23:04:16 -0500 (EST) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id DAF63A128A for ; Wed, 11 Dec 2024 04:04:15 +0000 (UTC) X-FDA: 82881334998.26.B199394 Received: from xmbghk7.mail.qq.com (xmbghk7.mail.qq.com [43.163.128.50]) by imf01.hostedemail.com (Postfix) with ESMTP id 1C1054000A for ; Wed, 11 Dec 2024 04:03:51 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=qq.com header.s=s201512 header.b="KgV/78wI"; spf=pass (imf01.hostedemail.com: domain of fujunjie1@qq.com designates 43.163.128.50 as permitted sender) smtp.mailfrom=fujunjie1@qq.com; dmarc=pass (policy=quarantine) header.from=qq.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733889843; 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-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=LkBoUmdBpLFzkj7kXBLhi46ju+g9LbQWgEQZgmD40uY=; b=0eCk8NP1v81chLdI01KYcWtlzdKvJkg8Z1SqAR2z29pO/b15xv8vFcxtdJB8HVqJB2LpYy QdoAPUQeFFD6SkRm81U22T6wlTCQt+6LSE8NZESR/qN5GobJgZCjfnErL94XYxIUpGWbwT zuhjTkIVOyDlGfdyS3ZTQ6Udw0QNVII= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733889843; a=rsa-sha256; cv=none; b=sYdr8YkfvobBdfYPSyic1c+Xf9hgQ55wuKVYdL+gwQ18bsy9FcHGcGgh5c4oWwd24CJeZG e2eEMbn+o8oUUv8aXaV+iCBH/ueKwEHguJbi4zE6/hWns1br7TkS1PSGWJFewnOby5QcRz 0XQzMMpQZ8CjYQzWdTF/aOyqko13KnI= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=qq.com header.s=s201512 header.b="KgV/78wI"; spf=pass (imf01.hostedemail.com: domain of fujunjie1@qq.com designates 43.163.128.50 as permitted sender) smtp.mailfrom=fujunjie1@qq.com; dmarc=pass (policy=quarantine) header.from=qq.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1733889823; bh=LkBoUmdBpLFzkj7kXBLhi46ju+g9LbQWgEQZgmD40uY=; h=From:To:Cc:Subject:Date; b=KgV/78wI9CtW4TNU6J8Amb/ISpPFpuqanNCD5JEkq6JzWGNbEdCtt14zXhiPf91uy lUSOOfoeNgWVCN9KM4oK4X37jzENQxPOCms8DPF1QRS3MFLByHAr7ZOEvCCUNbQsyc vU3r5hRKRwH8tX9zkrDMITchuKHL9k7kFT4iz5e8= Received: from localhost.localdomain ([2409:875e:a030:1001:14::e66]) by newxmes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tNiKoUn4qtxOXX2BH61UR1Q Nd5mX0yPbtdXcbjmMMXlNeOKNo3jN7HkBoWqg0WprmjH3d1lQ+pueL2zRm9zqvo5irkrascUEF1f LMOToykQRURSE7uXZp7yCEjoxtx9uOJdC99kopnJbkRr0zGsUP X-QQ-XMRINFO: M/715EihBoGSf6IYSX1iLFg= From: Junjie Fu To: linux-mm@kvack.org, akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org, willy@infradead.org, sj@kernel.org, Junjie Fu Subject: [PATCH RESEND] mempolicy.h: Remove unnecessary header file inclusions with no test failure Date: Wed, 11 Dec 2024 12:01:19 +0800 X-OQ-MSGID: <20241211040119.524324-1-fujunjie1@qq.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 1C1054000A X-Stat-Signature: y3s54sz58ztoy6nus1cwyqftf67esrq8 X-Rspam-User: X-HE-Tag: 1733889831-968509 X-HE-Meta: U2FsdGVkX18/Z+r7DRpza+t4HnbK9IIUA6lloWoMf6zdVESYqIa1xJd0Z+FbQMCjADsHhwSxlqSul3QoFcA9MLP/jptkigdwB5SdHru+keL0f+wy/BX1ICp38hn20vlfTbGEB+YM9PzhxWDaayqdJlSkjVaBi7HuvDhJLyUnQpGMKwIAGB5CVxvqOdMzImYzHk5lTiTLltUs7ASAITQEoGvcQewVhdsyeV6VoNHOeBKtkzUjnQB/3T/AEJ/e282+6QSzGRyPrzfr6wQklfSqQMmg/CdKAK5GnbXnFXKx9PQ2uvc3on+nFZt1V0ec5In82yOMH2AsuC7LaJCUUe6Y5dvXn5xyKxEj/0uZC18HA6hOQYo/M6tF0jVRTuRSFS4IbD1VSwm3dkfTEanYBlB5ykzXhmZSGfP+xA/uSuYJQu8mpxeadeFwLyx71NaCBLYjbCXS8/snADTKWXhxx7Bo0erJgOSJdHbP3DwLWW4Rj3fgpnry/Xcm+/c3xhNA4L+7yZUYbitQ/+hGBu45OOu8GBFuNsCA55GXsUF3G8Lj2fcNduybNbaYG7y1ju7aS5rvRP3vCW/TeW9Ag5iw/eZ9yd/BbD8Jm7cM2MpqkcEpxv14chgxOXeOO2CSafgs71/RsKt3rsx4KqfmXxj5W6Fcj466CseTja6pkc+vzwSfCCuKMOXeSIvN/C+8TQb5Pmhbt7ujZjW9CAWqEAbOw0A/0IvLVrMfi+IwCabnwnZ4uuvRgeuX45BoW/zORcGnx6+3HN+GSL6WRbqQBVqXyaw/SRKLo6YfSFM0g4W6L15S1qZwhSNd0eqBIIAE+tDYzPrjSx2ysuNd0zR4fjlyPLGwN1jv1nLaKsAsP6quNIDYQSw5BfATW3bH/dyCMV6ZvDbdSCI9G9BE4TjhvJARptvi7N93mAva0qs1wMtRYOrcJU5ft8FPQdcaOfkpR7fQImauW4Ij+c+4Yvshy62zVB2 8F7/HF4U PWvy4Vc9e3rMcdCYrXaj5JpaTBJYxhkvUZKfZ3Ohk4kTxJgPmwgbVsenrnf7S4S/PwVp/D/2KqH3Ccs1V3MzNUR6tGwzcPAT7aYbMoykeXPIatzCYXoCjIppZ9QmBHKKyHHKeCKJdyOryQQTqOdFHPWiTXBLxbIEoYdeedztTFrjRm98c0YOrWU+ErF8hCF88I1cKpc/u4FaUGCxdQTGH0Wybycp3w653p0kNE4obaAaszFGFL5vkPrtiUQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.374557, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Originally, linux/mempolicy.h included linux/pagemap.h because vma_migratable() was implemented inline within the header(linux/mempolicy.h), requiring mapping_gfp_mask() function from pagemap.h to implement vma_migratable(). Now that vma_migratable() is only declared in linux/mempolicy.h and its implementation has been moved to mempolicy.c, the inclusion of linux/pagemap.h in the header is no longer necessary. So the linux/pagemap.h in linux/mempolicy.h need to be remove. Since we used the function of pagemap.h in mempolicy.c, we need to include linux/pagemap.h in mempolicy.c. It appears that the modifications have been completed, but there may be compilation errors during testing. kunit UM build errors as below: $ ./tools/testing/kunit/kunit.py run --kunitconfig ./mm/damon/tests/ [...] fs/aio.c:525:71: error: ‘FGP_CREAT’ undeclared (first use in this function); did you mean ‘IPC_CREAT’? 525 | FGP_LOCK | FGP_ACCESSED | FGP_CREAT, | ^~~~~~~~~ | IPC_CREAT fs/aio.c:532:17: error: implicit declaration of function ‘folio_end_read’; did you mean ‘folio_test_head’? [-Werror=implicit-function-declaration] 532 | folio_end_read(folio, true); | ^~~~~~~~~~~~~~ | folio_test_head [...] FGP_CREAT defined in linux/pagemap.h was used in fs/aio.c, and the function folio_end_read declared in linux/pagemap.h is also used in fs/aio.c, so fs/aio.c need to include linux/pagemap.h. Signed-off-by: Junjie Fu --- fs/aio.c | 1 + include/linux/mempolicy.h | 1 - mm/mempolicy.c | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/aio.c b/fs/aio.c index 50671640b588..3c51c02631b2 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h index ce9885e0178a..d36877557b00 100644 --- a/include/linux/mempolicy.h +++ b/include/linux/mempolicy.h @@ -12,7 +12,6 @@ #include #include #include -#include #include struct mm_struct; diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 88eef9776bb0..c0c864b1bb67 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -98,6 +98,7 @@ #include #include #include +#include #include #include #include