From patchwork Fri Jan 6 17:18:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13091647 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 1F8E0C3DA7A for ; Fri, 6 Jan 2023 17:19:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6DEAB8E0002; Fri, 6 Jan 2023 12:19:03 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 68EB68E0001; Fri, 6 Jan 2023 12:19:03 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 57DC88E0002; Fri, 6 Jan 2023 12:19:03 -0500 (EST) 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 479528E0001 for ; Fri, 6 Jan 2023 12:19:03 -0500 (EST) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id F02A5AB509 for ; Fri, 6 Jan 2023 17:19:02 +0000 (UTC) X-FDA: 80325034524.09.40C663D Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf03.hostedemail.com (Postfix) with ESMTP id 865B120009 for ; Fri, 6 Jan 2023 17:19:01 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Ym4FgWJe; spf=pass (imf03.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1673025541; 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=MxrpNqoFSkvJiYJMwDwa9qj42MvLjMpzhFoMCnJdiN0=; b=Tk4cxfhRjoAxj65lCqRgNRdmJ29TQVNznitxWi5dh2dN1HEDPIgavqZBHwNYEcA67ry6Yc HNhKz8YkhERTEeS+DNPsc288b2HiJ/8dRFoAJasPSDTFA/DXhnYH4zHOmU1W1f0k8tb/JD SAwhXcAO6PCRaAgF6Qa2DLQxzS1C4PA= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Ym4FgWJe; spf=pass (imf03.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1673025541; a=rsa-sha256; cv=none; b=74ZetS9BIvqgZhbPQ+QSJfl3BiJCvLTpNz6J4Ye6Qdmuy28wvjfU3NDuF2ZOmmwk2UBL/F xaijus2IZHM5aaSOkvwJxVDY2W6q/hswRmeOeTVfnzmtDIBhvJ+uwgy5W6ze5kG9GIBshU +eeew+3JId0f/Tyiwi1nfNB53mOE/SM= 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 5AE5561EEA; Fri, 6 Jan 2023 17:19:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B4686C433D2; Fri, 6 Jan 2023 17:18:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673025540; bh=zsgQcMJyYEHvXA7+Hi2ymIKCkYKxtTDwcZPe25Ntk/c=; h=From:To:Cc:Subject:Date:From; b=Ym4FgWJenrYaENFFfiHkz5raOXqV2gO8l0VH6+uErul8LKptdgwrWS01elvsQgZz6 ZYa//Gq0qzKDbfIqqShqHsOIV6Tbk3fQ1Hlw2IzEQhCVbw0nVIIB2QcmeR3oP4t7XM oJN/EDTLheE85xLh46IKCZHk6AM4AZcNjwE0kX7djxvYBCjJR8RgdiAaKzeosuF2W1 etB9ZpWIIegqdrtPBiuTu6HafAu3AuKiX5kjm4Hgb7fujiNZHkV/YUvj0243vIr3e9 HjxEv09VWY4me/+kZebQbHTOIgEx+yoEx2dN0qyyMQ7NeypDK3Nmn0mDZ+aRw7CsQ6 w3ln33stGcPhw== From: SeongJae Park To: Andrew Morton , "Liam R. Howlett" Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, SeongJae Park Subject: [PATCH mm-unstable 1/1] include/linux/mm: declare different type of split_vma() for !CONFIG_MMU Date: Fri, 6 Jan 2023 17:18:57 +0000 Message-Id: <20230106171857.149918-1-sj@kernel.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 865B120009 X-Rspam-User: X-Stat-Signature: sndpxuspnimrji6qogoijm8hie8z1zb5 X-HE-Tag: 1673025541-167597 X-HE-Meta: U2FsdGVkX19grNc3P7rnPfjA3ZlFUChaGG0XC7eFjLd79+7jWFs1/H7ifUO6rSFWDRrPBwnzHUefCw21L/zD4+fNumC3moEWAU4K7dIS/rDlHONhBS1QYHBGdPzWlCbgV1CERsWsBZdvfsywlmcLfT8D2k1wGdH06IOYCY/iRQ1PircuqIRuok+9dWUypBuaPJ6rbvldSSSTUjgNfqJH1rOT2MTqO7ZqUdwWHsupfj6gEYD7nuKM9aVg2Gz9YevsXEonI3sHuzUZkGOoQ58n/Flczs3ZGhzSkA/6h3TQ2/FL/bbPwdMC+tcjMm9Q6miMO0fKxjbVmf9s06XchXFmxN2QO2Imy29XKp80pH8P5DTJiqUkRmLtMMHHAC8JQED22hg0vFuLWW7u9rE9JGVALQsObm2tyPVACZTHHF0j9RpZMfKsnaD319jrhmxfrl/W0JJ/uMKO20PUFCWlBu0x/z3D13IGOLrGmrn3TzIE4IgKU+uJUxBjE2ALxkqq0ZM9gd2DzYQsdUIXT7epzYSAhc/09cPIfDwJk/LqydjFwtHTiPahnyfgxCtck2Y0fkv+J8LAnVY+6R0mAmbbc+t3NFi80eEGuuAluYj3QG5gE3ZPgGD5PSdRicdsKnyX6Jx+7M7Lv7+vz5wQkgx/aW7pOS2VbXHixTurJFmp5iV5VIYW+eSUDH+k8YYzHTIg3lClwEkKFlvM3hZl0/u6k07YB91TRB2U3JNvZRk0E32qNdbCXbwjn33t7n6bp6LFqWNtKtn7pZiH3pxdcQcl4Ki81VhRTQ2aBl6sk7tez8zujpFDI9kdBAVbxifoNna8FZLKgzHraahcpqyM2pgOiTdUZDPZVWzjZqO81C+LzH8D4e5iErza+CvaNuVMou/jfxfrNuoVLru3DWKG2BpKV+lDziWg6t7QKJVuHps9fH0P53MAC8e+NG1eucf6Hksk2LmgSpnCT19tAOmsABl0B00 hgos01Tb YV0J6pIa/UnR/cmKOpIXXCWMWXrsIfuBSKeEoa+v0PrSEqb5DouhAdRwWkYk04QZBpkL+5rh+242SUG9my44UVb1FQKmqqD+i4mVyBUEWngtyGFziwzTCO0YQRkSRy9GkPl+t9tLiB9+OyyPJMPhDMtXkiYyMABFSEdFA 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: Commit 95000286ff79 ("mm: switch vma_merge(), split_vma(), and __split_vma to vma iterator") on mm-unstable didn't make the change to nommu.c, but the declaration change was applied to !CONFIG_MMU, too. It causes below build failure. linux/mm/nommu.c:1347:5: error: conflicting types for 'split_vma' 1347 | int split_vma(struct mm_struct *mm, struct vm_area_struct *vma, | ^~~~~~~~~ In file included from linux/mm/nommu.c:20: linux/include/linux/mm.h:2846:12: note: previous declaration of 'split_vma' was here 2846 | extern int split_vma(struct vma_iterator *vmi, struct vm_area_struct *, | ^~~~~~~~~ Fix the build failure by adding the split_vma() declaration for !CONFIG_MMU case. Fixes: 95000286ff79 ("mm: switch vma_merge(), split_vma(), and __split_vma to vma iterator") on mm-unstabl Signed-off-by: SeongJae Park --- include/linux/mm.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/mm.h b/include/linux/mm.h index 4d9148b939f8..a2bf261cdbef 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -2843,8 +2843,13 @@ extern struct vm_area_struct *vma_merge(struct vma_iterator *vmi, extern struct anon_vma *find_mergeable_anon_vma(struct vm_area_struct *); extern int __split_vma(struct vma_iterator *vmi, struct vm_area_struct *, unsigned long addr, int new_below); +#ifdef CONFIG_MMU extern int split_vma(struct vma_iterator *vmi, struct vm_area_struct *, unsigned long addr, int new_below); +#else +extern int split_vma(struct mm_struct *, struct vm_area_struct *, + unsigned long addr, int new_below); +#endif /* CONFIG_MMU */ extern int insert_vm_struct(struct mm_struct *, struct vm_area_struct *); extern void unlink_file_vma(struct vm_area_struct *); extern struct vm_area_struct *copy_vma(struct vm_area_struct **,