Message ID | 20190121075722.7945-16-peterx@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D4E7513BF for <patchwork-linux-mm@patchwork.kernel.org>; Mon, 21 Jan 2019 07:59:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C778A29CB1 for <patchwork-linux-mm@patchwork.kernel.org>; Mon, 21 Jan 2019 07:59:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BAED529CBB; Mon, 21 Jan 2019 07:59:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 59FE929CB1 for <patchwork-linux-mm@patchwork.kernel.org>; Mon, 21 Jan 2019 07:59:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 263338E000D; Mon, 21 Jan 2019 02:59:34 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 2133A8E0001; Mon, 21 Jan 2019 02:59:34 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 103FF8E000D; Mon, 21 Jan 2019 02:59:34 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by kanga.kvack.org (Postfix) with ESMTP id DC83D8E0001 for <linux-mm@kvack.org>; Mon, 21 Jan 2019 02:59:33 -0500 (EST) Received: by mail-qk1-f200.google.com with SMTP id k66so18724869qkf.1 for <linux-mm@kvack.org>; Sun, 20 Jan 2019 23:59:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=Zc32lxTVLUb1OMMe42Eclie7QeYOeMdbOGekCMZ6Zmo=; b=qhn4c6xj0KBCpvpB58daqHnojrOpts0Pw4h0b9phD4b0oTEhtx+h9bbTkUdExGZXHL m9fjZ7HBb0tEjGlbZFi7bmWOUJgqgKNikfUIqGSx1PU0mrBvzQv7fIcy+cms7vQw/z/a 61IhrSVykvieXA4CqVjSVRBpAO1lASB9gHA+guHPM8IbWDtmz4VwPL8+U9nMFPl7LKZu vDVWgAOw8yFIXeCuWSzn99l8+4K3l6E2RMMatC7dsVBU4hECbeit/McTi1ugpNQu7sit 88LzhVahNcKdhYy1/63xGyhl4JTF0iLY5ab4TpcUJisxNreEoDS3rd7Ssdakb4SBTzCX EjLw== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of peterx@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=peterx@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Gm-Message-State: AJcUukceDHMByGe3p67pi6RxEuxW5cu6ejA6tj5I3VWYti9VkNuOHd1D Mw2Zr2lKk69VBq/r93N9IAxCzZvlfF3pbqZg1L3dRAFczI+esVQ5IGW/g/fF2YVi+y03MKBZTp6 9gzM9oK1kZkurdfz2y+ONgAdbEaM2CnZBwoxZj8/Z6FpEoa1XcmB9HF240rP/s99YhQ== X-Received: by 2002:ac8:760f:: with SMTP id t15mr25074364qtq.188.1548057573711; Sun, 20 Jan 2019 23:59:33 -0800 (PST) X-Google-Smtp-Source: ALg8bN4qpLfuq/UyIv4N5FJFmaVlqLsTNOrFLDhsc5T+SsEu3rpQbo4FpYxhzDOsQDoGhFw7MIRf X-Received: by 2002:ac8:760f:: with SMTP id t15mr25074343qtq.188.1548057573268; Sun, 20 Jan 2019 23:59:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548057573; cv=none; d=google.com; s=arc-20160816; b=idBJXNVgkNHtUVMbhrnei8hw82AyeZNAtRPliB/nt3m/L4wG0v5aXEX/hi/lmDxWPw xwARHCFd2Io98ifBf6mvE0yk+KgvWmeL1tgaXupngSWTvBPyp3I5M3lYbvSclvWQKA4p z2VjxtKhyuik5Bme6jVgNpwWJSKJokGoO5Z9LVoOUxkBJybdTTYS6Y4t4wMK4MZOVeSm 0M9Fhdc5RAE9NkwlaiRaq4j8lhRU0GB0/YjwCXL0pMsmUSVjLGNEPX1Tw8zG3KsozstL jnjC6CI/SxDDdMjURjRCYGv6i5HjuXinc8L6K31g3YbVQGXtsSxTWjrUjen3nvZFxj45 rd0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from; bh=Zc32lxTVLUb1OMMe42Eclie7QeYOeMdbOGekCMZ6Zmo=; b=wPF/7RZXLCqnEle7l0PdGnyV4wh4wvVBuqusRve1wJXkf233MFyD0YkGQKgL/3lFKL tbdZo3pZNdv2NKsjUOPPecaXkQZFzzybIXVQWX7xYIlXbMcUGTjOkJaUJSxm9D+reDuC riQ2VbEAadzbEDVynEA2EJRAsy4/UoUnCD+XG8TPa4hfraOFyhNRqZ9LBfevcS984iPN B9YXEY3FYlp5mBs/3PfYvJKVlg2N4AoyjJyJ2px5DEJl0crw1GbNGVCDj1P3Xf0bnPk4 WKgwuS/r6yocapSlKXMHuB6KMwAAI3l4OSqmba5r4TVZh2e2wtEFH3OMqcf0lYhAdcR4 pJgg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of peterx@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=peterx@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id o63si2294025qka.164.2019.01.20.23.59.33 for <linux-mm@kvack.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 Jan 2019 23:59:33 -0800 (PST) Received-SPF: pass (google.com: domain of peterx@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of peterx@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=peterx@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 67BF4806B4; Mon, 21 Jan 2019 07:59:32 +0000 (UTC) Received: from xz-x1.nay.redhat.com (dhcp-14-116.nay.redhat.com [10.66.14.116]) by smtp.corp.redhat.com (Postfix) with ESMTP id D79F6608F3; Mon, 21 Jan 2019 07:59:26 +0000 (UTC) From: Peter Xu <peterx@redhat.com> To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Hugh Dickins <hughd@google.com>, Maya Gokhale <gokhale2@llnl.gov>, Jerome Glisse <jglisse@redhat.com>, Johannes Weiner <hannes@cmpxchg.org>, peterx@redhat.com, Martin Cracauer <cracauer@cons.org>, Denis Plotnikov <dplotnikov@virtuozzo.com>, Shaohua Li <shli@fb.com>, Andrea Arcangeli <aarcange@redhat.com>, Pavel Emelyanov <xemul@parallels.com>, Mike Kravetz <mike.kravetz@oracle.com>, Marty McFadden <mcfadden8@llnl.gov>, Mike Rapoport <rppt@linux.vnet.ibm.com>, Mel Gorman <mgorman@suse.de>, "Kirill A . Shutemov" <kirill@shutemov.name>, "Dr . David Alan Gilbert" <dgilbert@redhat.com> Subject: [PATCH RFC 15/24] mm: export wp_page_copy() Date: Mon, 21 Jan 2019 15:57:13 +0800 Message-Id: <20190121075722.7945-16-peterx@redhat.com> In-Reply-To: <20190121075722.7945-1-peterx@redhat.com> References: <20190121075722.7945-1-peterx@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 21 Jan 2019 07:59:32 +0000 (UTC) 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: <linux-mm.kvack.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
userfaultfd: write protection support
|
expand
|
diff --git a/include/linux/mm.h b/include/linux/mm.h index 89345b51d8bd..bf04e187fafe 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -378,6 +378,8 @@ struct vm_fault { */ }; +vm_fault_t wp_page_copy(struct vm_fault *vmf); + /* page entry size for vm->huge_fault() */ enum page_entry_size { PE_SIZE_PTE = 0, diff --git a/mm/memory.c b/mm/memory.c index 7f276158683b..ef823c07f635 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -2239,7 +2239,7 @@ static inline void wp_page_reuse(struct vm_fault *vmf) * held to the old page, as well as updating the rmap. * - In any case, unlock the PTL and drop the reference we took to the old page. */ -static vm_fault_t wp_page_copy(struct vm_fault *vmf) +vm_fault_t wp_page_copy(struct vm_fault *vmf) { struct vm_area_struct *vma = vmf->vma; struct mm_struct *mm = vma->vm_mm;
Export this function for usages outside page fault handlers. Signed-off-by: Peter Xu <peterx@redhat.com> --- include/linux/mm.h | 2 ++ mm/memory.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)