[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190905185910.GS29434@bombadil.infradead.org>
Date: Thu, 5 Sep 2019 11:59:10 -0700
From: Matthew Wilcox <willy@...radead.org>
To: Souptick Joarder <jrdr.linux@...il.com>
Cc: akpm@...ux-foundation.org, rcampbell@...dia.com,
jglisse@...hat.com, mhocko@...e.com, aneesh.kumar@...ux.ibm.com,
peterz@...radead.org, airlied@...hat.com, thellstrom@...are.com,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/memory.c: Convert to use vmf_error()
On Fri, Sep 06, 2019 at 12:13:00AM +0530, Souptick Joarder wrote:
> +++ b/mm/memory.c
> @@ -1750,13 +1750,10 @@ static vm_fault_t __vm_insert_mixed(struct vm_area_struct *vma,
> } else {
> return insert_pfn(vma, addr, pfn, pgprot, mkwrite);
> }
> -
> - if (err == -ENOMEM)
> - return VM_FAULT_OOM;
> - if (err < 0 && err != -EBUSY)
> - return VM_FAULT_SIGBUS;
> -
> - return VM_FAULT_NOPAGE;
> + if (!err || err == -EBUSY)
> + return VM_FAULT_NOPAGE;
> + else
> + return vmf_error(err);
> }
My plan is to convert insert_page() to return a VM_FAULT error code like
insert_pfn() does. Need to finish off the vm_insert_page() conversions
first ;-)
Powered by blists - more mailing lists