From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f43.google.com ([209.85.215.43]:46819 "EHLO mail-lf0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750818AbeDTTVr (ORCPT ); Fri, 20 Apr 2018 15:21:47 -0400 Received: by mail-lf0-f43.google.com with SMTP id j68-v6so6583240lfg.13 for ; Fri, 20 Apr 2018 12:21:47 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20180417210005.GC3603@bombadil.infradead.org> References: <20180417153507.GA31905@jordon-HP-15-Notebook-PC> <20180417210005.GC3603@bombadil.infradead.org> From: Souptick Joarder Date: Sat, 21 Apr 2018 00:51:44 +0530 Message-ID: Subject: Re: [PATCH] fs: dax: Adding new return type vm_fault_t To: Matthew Wilcox Cc: mawilcox@microsoft.com, Ross Zwisler , Al Viro , linux-fsdevel Content-Type: text/plain; charset="UTF-8" Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Apr 18, 2018 at 2:30 AM, Matthew Wilcox wrote: > 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(). > Although vm_insert_mixed_mkwrite () is getting called only from dax, but if we directly change it to vmf_insert_mixed_mkwrite() with return type vm_fault_t, we end with changing multiple functions recursively. In my opinion, it will complicate things. It's better to go with current inline vmf_insert_mixed_mkwrite() approach.