Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1146953ybh; Thu, 12 Mar 2020 18:15:50 -0700 (PDT) X-Google-Smtp-Source: ADFU+vupjIp6s4MkGSAw4hxnE0CSylRer6nYn60RLJTyCGJYnc1qq863OaXjxQG91hNVzRbsQdHt X-Received: by 2002:a9d:3603:: with SMTP id w3mr9092915otb.94.1584062150725; Thu, 12 Mar 2020 18:15:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584062150; cv=none; d=google.com; s=arc-20160816; b=IfaSWWLDG0gzUmk7baFKQgOSzrtYkHhPCgj9pf1Cj8Gtbd1kEBxukau6HDYa4dUMWx ALcVMdf2k6j7lUKYzm7fPqH1m67wObyGA3Ld7ECZviYXkUHpBQm6EoNN/u4mCcXt6AYs UtUBdLd352jDHCZNhcODNMNpuhVvCPu0IrDRV/RLPpqeNGoVXSEt9cxU3ThL3FWaTN4E SVTscrg75uAjc14HtgYpRiCRcAYAXHzw9LJGNII766dd6RjxNiyl6S8WBy7bOOM7N9Ia QlSjqzg/TYlONJtMzpJsoZUN/UOBTlwHL/wm30zJj0FEhesg4lH4Fkmx8ZB5P5fi1x90 VyfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:dlp-filter:cms-type :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :dkim-filter; bh=fzFOTyd4Kwji4bmqnDA3HgG3lu01uGhDeF3O7fUMvII=; b=mleghbJfo2YB7HECucFXi40rEPyX5/9EFmbHEuzNRKk+SyQSC/aOQqCDA1nH7Ei1IA bUGQ19d06K1hV47lIkQ7c90WSZFz9CusBNrQfiaCLaDyEiEHdMx5/HDvFWuhuWmp2kCs G5J2rzoALFdLD6oNpWtcEl20f9fZDH26pw665UpLeOYHKtESGMoNnQNrE128Kncy/3QA xk6zD2MaSjbAGUaUpjvKUlUlUpVGzjhHba9v56ViE57mMCsEz8vtNWfL7xU1HjYpCObx hND0oSVYOKF5eC09wKtBp4QkDcodGgurFxkAwgOPggW+dVHtyIDpOKFybWk71kqaJHnM yX+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="KG/wCXkQ"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w123si1715877oiw.119.2020.03.12.18.15.38; Thu, 12 Mar 2020 18:15:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="KG/wCXkQ"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727175AbgCMBOf (ORCPT + 99 others); Thu, 12 Mar 2020 21:14:35 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:28516 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726882AbgCMBOf (ORCPT ); Thu, 12 Mar 2020 21:14:35 -0400 Received: from epcas1p1.samsung.com (unknown [182.195.41.45]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20200313011432epoutp0478734c34102c1fc7a7d9da2c2cbb0baf~7uA-62VBE2385723857epoutp04a for ; Fri, 13 Mar 2020 01:14:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20200313011432epoutp0478734c34102c1fc7a7d9da2c2cbb0baf~7uA-62VBE2385723857epoutp04a DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1584062072; bh=fzFOTyd4Kwji4bmqnDA3HgG3lu01uGhDeF3O7fUMvII=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KG/wCXkQKFQQQgL9uh9+l8ZLbd3rS13hX+Savr6cs8CwZAEuAoIzgCHG7RGvJH9f2 5QYCLnkJnIrw/fPuuUdSqBXP+W4hknpSuvxeBqFV/65XD55ZFvRIWfJrSYmI8evJPU tbTjO/s1oyHQwZBfJpJd3bfSVy2tUQ8fIjGx9AEE= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20200313011432epcas1p44a713e2d3ce7173ff1ec24377f92ecb4~7uA-bAkuu0948609486epcas1p49; Fri, 13 Mar 2020 01:14:32 +0000 (GMT) Received: from epsmges1p4.samsung.com (unknown [182.195.40.164]) by epsnrtp4.localdomain (Postfix) with ESMTP id 48dnm71Sw5zMqYkY; Fri, 13 Mar 2020 01:14:31 +0000 (GMT) Received: from epcas1p2.samsung.com ( [182.195.41.46]) by epsmges1p4.samsung.com (Symantec Messaging Gateway) with SMTP id 05.DD.48019.77EDA6E5; Fri, 13 Mar 2020 10:14:31 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200313011430epcas1p129e4033f12b9c02f71443e0b359a26e5~7uA94E3mw1118711187epcas1p1x; Fri, 13 Mar 2020 01:14:30 +0000 (GMT) Received: from epsmgms1p2new.samsung.com (unknown [182.195.42.42]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200313011430epsmtrp2190fd3594586da0296370e470c8923b2~7uA90rXJk2955029550epsmtrp2j; Fri, 13 Mar 2020 01:14:30 +0000 (GMT) X-AuditID: b6c32a38-257ff7000001bb93-51-5e6ade77f290 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 1F.B5.04215.67EDA6E5; Fri, 13 Mar 2020 10:14:30 +0900 (KST) Received: from jaewon-linux.10.32.193.11 (unknown [10.253.104.82]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200313011430epsmtip21f1331bfc614ded8461c4a5ba88b3c7c~7uA9uEzuD2267422674epsmtip2M; Fri, 13 Mar 2020 01:14:30 +0000 (GMT) From: Jaewon Kim To: willy@infradead.org, walken@google.com, bp@suse.de, akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, jaewon31.kim@gmail.com, Jaewon Kim Subject: [PATCH v2 1/2] mmap: remove inline of vm_unmapped_area Date: Fri, 13 Mar 2020 10:14:19 +0900 Message-Id: <20200313011420.15995-2-jaewon31.kim@samsung.com> X-Mailer: git-send-email 2.13.7 In-Reply-To: <20200313011420.15995-1-jaewon31.kim@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA02Se0hTYRjG+Tw7Z0drdpiaLya6DjWYoW7N2SlcRUYd0MKIICNcBz1Mc7d2 NrMrVla61FKInBgsypSy22ZZlkEGdi/LLn+kXclS0kqzMrttHqP++z3v9zy8D9/3kZh8BI8i 8ywO3m7hTDQRIjl3VZUQv/7Z2iy19+gEpvZUI8FU7lUxe3xuxJR/6AtiOltqCeZZ42+c+VW1 hRn9VkvMJ9kLNd1S1uN1sr6GONY7WCVlr1ePStiKpmOI9d3axA55YzLIVaaUXJ7L4e0K3pJt zcmzGPV02nJDqkGXrNbEa2Yzs2iFhTPzenphekb8ojyTvxWtKOBMTv8ogxMEOnFuit3qdPCK XKvg0NO8Lcdk06htCQJnFpwWY0K21TxHo1bP1Pmda0y5A4c/4zavvHC4+o6kCLknuVAwCVQS FDe0SFwohJRT5xG4bnuQKAYRXHY9HxdfEJQcqJD8jTyoaMXEg1YEh0r2jYuvCPoOdhEBF0HN gA+eKtyFSDKcWg6v3WNjjHJC//vrWIDDqHlw2v0JD7CEmg7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i/Pii0pzU4kOM0hwsSuK88vnHIoUE0hNLUrNTUwtSi2CyTBycUg2M9bMnei14pWL48H/B DM6muBzPgE/zLh6dnPS1587UiV3MzV+eHdymoHejnOeEztftD/mZo/Jf/034ztz0cMG+hxca hHZYLH/dX8zt81lFZsLvfrWif8LXuYsnFV78495oPZ9vlzmP0sdjhyRn+dY25Dd+6POK+3H4 967j1QXR8g76/xYK2Yu4KbEUZyQaajEXFScCAHxD8/tDAgAA X-CMS-MailID: 20200313011430epcas1p129e4033f12b9c02f71443e0b359a26e5 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20200313011430epcas1p129e4033f12b9c02f71443e0b359a26e5 References: <20200313011420.15995-1-jaewon31.kim@samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In prepration for next patch remove inline of vm_unmapped_area and move code to mmap.c. There is no logical change. Also remove unmapped_area[_topdown] out of mm.h, there is no code calling to them. Signed-off-by: Jaewon Kim --- include/linux/mm.h | 21 +-------------------- mm/mmap.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index 52269e56c514..1cb01f4a83c9 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -2364,26 +2364,7 @@ struct vm_unmapped_area_info { unsigned long align_offset; }; -extern unsigned long unmapped_area(struct vm_unmapped_area_info *info); -extern unsigned long unmapped_area_topdown(struct vm_unmapped_area_info *info); - -/* - * Search for an unmapped address range. - * - * We are looking for a range that: - * - does not intersect with any VMA; - * - is contained within the [low_limit, high_limit) interval; - * - is at least the desired size. - * - satisfies (begin_addr & align_mask) == (align_offset & align_mask) - */ -static inline unsigned long -vm_unmapped_area(struct vm_unmapped_area_info *info) -{ - if (info->flags & VM_UNMAPPED_AREA_TOPDOWN) - return unmapped_area_topdown(info); - else - return unmapped_area(info); -} +extern unsigned long vm_unmapped_area(struct vm_unmapped_area_info *info); /* truncate.c */ extern void truncate_inode_pages(struct address_space *, loff_t); diff --git a/mm/mmap.c b/mm/mmap.c index d681a20eb4ea..eeaddb76286c 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -2050,6 +2050,22 @@ unsigned long unmapped_area_topdown(struct vm_unmapped_area_info *info) return gap_end; } +/* + * Search for an unmapped address range. + * + * We are looking for a range that: + * - does not intersect with any VMA; + * - is contained within the [low_limit, high_limit) interval; + * - is at least the desired size. + * - satisfies (begin_addr & align_mask) == (align_offset & align_mask) + */ +unsigned long vm_unmapped_area(struct vm_unmapped_area_info *info) +{ + if (info->flags & VM_UNMAPPED_AREA_TOPDOWN) + return unmapped_area_topdown(info); + else + return unmapped_area(info); +} #ifndef arch_get_mmap_end #define arch_get_mmap_end(addr) (TASK_SIZE) -- 2.13.7