Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755432AbdGXLrv (ORCPT ); Mon, 24 Jul 2017 07:47:51 -0400 Received: from mx2.suse.de ([195.135.220.15]:53657 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751482AbdGXLrn (ORCPT ); Mon, 24 Jul 2017 07:47:43 -0400 Date: Mon, 24 Jul 2017 13:47:38 +0200 From: Jan Kara To: Ross Zwisler Cc: Andrew Morton , linux-kernel@vger.kernel.org, "Darrick J. Wong" , "Theodore Ts'o" , Alexander Viro , Andreas Dilger , Christoph Hellwig , Dan Williams , Dave Chinner , David Airlie , Ingo Molnar , Inki Dae , Jan Kara , Jonathan Corbet , Joonyoung Shim , Krzysztof Kozlowski , Kukjin Kim , Kyungmin Park , Matthew Wilcox , Patrik Jakobsson , Rob Clark , Seung-Woo Kim , Steven Rostedt , Tomi Valkeinen , dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-doc@vger.kernel.org, linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-nvdimm@lists.01.org, linux-samsung-soc@vger.kernel.org, linux-xfs@vger.kernel.org Subject: Re: [PATCH v4 4/5] dax: remove DAX code from page_cache_tree_insert() Message-ID: <20170724114738.GL652@quack2.suse.cz> References: <20170721223956.29485-1-ross.zwisler@linux.intel.com> <20170721223956.29485-5-ross.zwisler@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170721223956.29485-5-ross.zwisler@linux.intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2653 Lines: 78 On Fri 21-07-17 16:39:54, Ross Zwisler wrote: > Now that we no longer insert struct page pointers in DAX radix trees we can > remove the special casing for DAX in page_cache_tree_insert(). This also > allows us to make dax_wake_mapping_entry_waiter() local to fs/dax.c, > removing it from dax.h. > > Signed-off-by: Ross Zwisler > Suggested-by: Jan Kara Looks good. You can add: Reviewed-by: Jan Kara Honza > --- > fs/dax.c | 2 +- > include/linux/dax.h | 2 -- > mm/filemap.c | 13 ++----------- > 3 files changed, 3 insertions(+), 14 deletions(-) > > diff --git a/fs/dax.c b/fs/dax.c > index fb0e4c1..0e27d90 100644 > --- a/fs/dax.c > +++ b/fs/dax.c > @@ -127,7 +127,7 @@ static int wake_exceptional_entry_func(wait_queue_entry_t *wait, unsigned int mo > * correct waitqueue where tasks might be waiting for that old 'entry' and > * wake them. > */ > -void dax_wake_mapping_entry_waiter(struct address_space *mapping, > +static void dax_wake_mapping_entry_waiter(struct address_space *mapping, > pgoff_t index, void *entry, bool wake_all) > { > struct exceptional_entry_key key; > diff --git a/include/linux/dax.h b/include/linux/dax.h > index 29cced8..afa99bb 100644 > --- a/include/linux/dax.h > +++ b/include/linux/dax.h > @@ -122,8 +122,6 @@ int dax_iomap_fault(struct vm_fault *vmf, enum page_entry_size pe_size, > int dax_delete_mapping_entry(struct address_space *mapping, pgoff_t index); > int dax_invalidate_mapping_entry_sync(struct address_space *mapping, > pgoff_t index); > -void dax_wake_mapping_entry_waiter(struct address_space *mapping, > - pgoff_t index, void *entry, bool wake_all); > > #ifdef CONFIG_FS_DAX > int __dax_zero_page_range(struct block_device *bdev, > diff --git a/mm/filemap.c b/mm/filemap.c > index a497024..1bf1265 100644 > --- a/mm/filemap.c > +++ b/mm/filemap.c > @@ -130,17 +130,8 @@ static int page_cache_tree_insert(struct address_space *mapping, > return -EEXIST; > > mapping->nrexceptional--; > - if (!dax_mapping(mapping)) { > - if (shadowp) > - *shadowp = p; > - } else { > - /* DAX can replace empty locked entry with a hole */ > - WARN_ON_ONCE(p != > - dax_radix_locked_entry(0, RADIX_DAX_EMPTY)); > - /* Wakeup waiters for exceptional entry lock */ > - dax_wake_mapping_entry_waiter(mapping, page->index, p, > - true); > - } > + if (shadowp) > + *shadowp = p; > } > __radix_tree_replace(&mapping->page_tree, node, slot, page, > workingset_update_node, mapping); > -- > 2.9.4 > -- Jan Kara SUSE Labs, CR