dax: remove DAX code from page_cache_tree_insert()
Subsystems (4)
[email protected]
maintainerPATCH 5/119 dax: remove DAX code from page_cache_tree_insert()
From: Ross Zwisler <[email protected]>
Subject: dax: remove DAX code from page_cache_tree_insert()
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 <[email protected]>
Suggested-by Jan Kara <[email protected]>
Reviewed-by Jan Kara <[email protected]>
Cc "Darrick J. Wong" <[email protected]>
Cc "Theodore Ts'o" <[email protected]>
Cc Alexander Viro <[email protected]>
Cc Andreas Dilger <[email protected]>
Cc Christoph Hellwig <[email protected]>
Cc Dan Williams <[email protected]>
Cc Dave Chinner <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Jonathan Corbet <[email protected]>
Cc Matthew Wilcox <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc Kirill A. Shutemov <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
fs/dax.c | 2 +- include/linux/dax.h | 2 -- mm/filemap.c | 13 ++----------- 3 files changed, 3 insertions(+), 14 deletions(-)
fs/dax.c renamed from fs/dax.c~dax-remove-dax-code-from-page_cache_tree_insert +1 -1
@@ -127,7 +127,7 @@ static int wake_exceptional_entry_func(w* 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;
include/linux/dax.h renamed from include/linux/dax.h~dax-remove-dax-code-from-page_cache_tree_insert +0 -2
@@ -123,8 +123,6 @@ int dax_iomap_fault(struct vm_fault *vmfint 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,
mm/filemap.c renamed from mm/filemap.c~dax-remove-dax-code-from-page_cache_tree_insert +2 -11
@@ -130,17 +130,8 @@ static int page_cache_tree_insert(structreturn -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);
_