From: Andrew Morton <akpm@linux-foundation.org>
To: Souptick Joarder <jrdr.linux@gmail.com>
Cc: willy@infradead.org, viro@zeniv.linux.org.uk, hughd@google.com,
mhocko@suse.com, ross.zwisler@linux.intel.com,
zi.yan@cs.rutgers.edu, kirill.shutemov@linux.intel.com,
dan.j.williams@intel.com, gregkh@linuxfoundation.org,
mark.rutland@arm.com, riel@redhat.com, pasha.tatashin@oracle.com,
jschoenh@amazon.de, kstewart@linuxfoundation.org,
rientjes@google.com, tglx@linutronix.de, peterz@infradead.org,
mgorman@suse.de, yang.s@alibaba-inc.com, minchan@kernel.org,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: [PATCH v3] mm: Change return type int to vm_fault_t for fault handlers
Date: Tue, 24 Jul 2018 15:36:21 -0700 [thread overview]
Message-ID: <20180724153621.e7eed7faa1d265eee73a7031@linux-foundation.org> (raw)
In-Reply-To: <20180604171727.GA20279@jordon-HP-15-Notebook-PC>
On Mon, 4 Jun 2018 22:47:27 +0530 Souptick Joarder <jrdr.linux@gmail.com> wrote:
> Use new return type vm_fault_t for fault handler. For
> now, this is just documenting that the function returns
> a VM_FAULT value rather than an errno. Once all instances
> are converted, vm_fault_t will become a distinct type.
>
> Ref-> commit 1c8f422059ae ("mm: change return type to vm_fault_t")
>
> The aim is to change the return type of finish_fault()
> and handle_mm_fault() to vm_fault_t type. As part of
> that clean up return type of all other recursively called
> functions have been changed to vm_fault_t type.
>
> The places from where handle_mm_fault() is getting invoked
> will be change to vm_fault_t type but in a separate patch.
>
> vmf_error() is the newly introduce inline function
> in 4.17-rc6.
Looks OK.
For some reason the shmem.c changes are already present.
One incidental fixup:
From: Andrew Morton <akpm@linux-foundation.org>
Subject: mm-change-return-type-int-to-vm_fault_t-for-fault-handlers-fix
don't shadow outer local `ret' in __do_huge_pmd_anonymous_page()
--- a/mm/huge_memory.c~mm-change-return-type-int-to-vm_fault_t-for-fault-handlers-fix
+++ a/mm/huge_memory.c
@@ -584,15 +584,15 @@ static vm_fault_t __do_huge_pmd_anonymou
/* Deliver the page fault to userland */
if (userfaultfd_missing(vma)) {
- vm_fault_t ret;
+ vm_fault_t ret2;
spin_unlock(vmf->ptl);
mem_cgroup_cancel_charge(page, memcg, true);
put_page(page);
pte_free(vma->vm_mm, pgtable);
- ret = handle_userfault(vmf, VM_UFFD_MISSING);
- VM_BUG_ON(ret & VM_FAULT_FALLBACK);
- return ret;
+ ret2 = handle_userfault(vmf, VM_UFFD_MISSING);
+ VM_BUG_ON(ret2 & VM_FAULT_FALLBACK);
+ return ret2;
}
entry = mk_huge_pmd(page, vma->vm_page_prot);
prev parent reply other threads:[~2018-07-24 22:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-04 17:17 [PATCH v3] mm: Change return type int to vm_fault_t for fault handlers Souptick Joarder
2018-06-19 4:56 ` Souptick Joarder
2018-07-13 16:47 ` Souptick Joarder
2018-07-24 22:36 ` Andrew Morton [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180724153621.e7eed7faa1d265eee73a7031@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=dan.j.williams@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=hughd@google.com \
--cc=jrdr.linux@gmail.com \
--cc=jschoenh@amazon.de \
--cc=kirill.shutemov@linux.intel.com \
--cc=kstewart@linuxfoundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mark.rutland@arm.com \
--cc=mgorman@suse.de \
--cc=mhocko@suse.com \
--cc=minchan@kernel.org \
--cc=pasha.tatashin@oracle.com \
--cc=peterz@infradead.org \
--cc=riel@redhat.com \
--cc=rientjes@google.com \
--cc=ross.zwisler@linux.intel.com \
--cc=tglx@linutronix.de \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@infradead.org \
--cc=yang.s@alibaba-inc.com \
--cc=zi.yan@cs.rutgers.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).