[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFqt6zZti0oY7C-pU0LhsHtctqeWBkikH6Pb0wfBZSigHNMUwA@mail.gmail.com>
Date: Fri, 27 Apr 2018 10:54:53 +0530
From: Souptick Joarder <jrdr.linux@...il.com>
To: Ross Zwisler <ross.zwisler@...ux.intel.com>,
Souptick Joarder <jrdr.linux@...il.com>,
Matthew Wilcox <willy@...radead.org>, Jan Kara <jack@...e.cz>,
Al Viro <viro@...iv.linux.org.uk>,
Andrew Morton <akpm@...ux-foundation.org>,
Dan Williams <dan.j.williams@...el.com>,
Michal Hocko <mhocko@...e.com>,
kirill.shutemov@...ux.intel.com,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
Linux-MM <linux-mm@...ck.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6] fs: dax: Adding new return type vm_fault_t
> I noticed that we have the following status translation now in 4 places in 2
> files:
>
> if (err == -ENOMEM)
> return VM_FAULT_OOM;
> if (err < 0 && err != -EBUSY)
> return VM_FAULT_SIGBUS;
> return VM_FAULT_NOPAGE;
>
>
> This happens in vmf_insert_mixed_mkwrite(), vmf_insert_page(),
> vmf_insert_mixed() and vmf_insert_pfn().
>
> I think it'd be a good idea to consolidate this translation into an inline
> helper, in the spirit of dax_fault_return(). This will ensure that if/when we
> start changing this status translation, we won't accidentally miss some of the
> places which would make them get out of sync. No need to fold this into this
> patch - it should be a separate change.
Sure, I will send this as a separate patch.
Powered by blists - more mailing lists