From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bombadil.infradead.org ([198.137.202.133]:58266 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752320AbeDQVAI (ORCPT ); Tue, 17 Apr 2018 17:00:08 -0400 Date: Tue, 17 Apr 2018 14:00:05 -0700 From: Matthew Wilcox To: Souptick Joarder Cc: mawilcox@microsoft.com, ross.zwisler@linux.intel.com, viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH] fs: dax: Adding new return type vm_fault_t Message-ID: <20180417210005.GC3603@bombadil.infradead.org> References: <20180417153507.GA31905@jordon-HP-15-Notebook-PC> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180417153507.GA31905@jordon-HP-15-Notebook-PC> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Apr 17, 2018 at 09:05:07PM +0530, Souptick Joarder wrote: > There was an existing bug inside dax_load_hole() > if vm_insert_mixed had failed to allocate a page table, > we'd return VM_FAULT_NOPAGE instead of VM_FAULT_OOM. > With vmf_insert_mixed this issue is addressed. > > vmf_insert_mixed_mkwrite() is the new wrapper function > which will convert err returned from vm_insert_mixed_ > mkwrite() to vm_fault_t type. Since dax is the only caller of vm_insert_mixed_mkwrite(), rather than introducing a wrapper function, you should just convert vm_insert_mixed_mkwrite() to vmf_insert_mixed_mkwrite(). > int error, major = 0; > bool write = vmf->flags & FAULT_FLAG_WRITE; > bool sync; > - int vmf_ret = 0; > + vm_fault_t vmf_ret = 0; I'd rename this to just 'ret' like everywhere else.