diff options
-rw-r--r-- | fs/dax.c | 2 | ||||
-rw-r--r-- | include/linux/dax.h | 2 | ||||
-rw-r--r-- | mm/filemap.c | 13 |
3 files changed, 3 insertions, 14 deletions
@@ -127,7 +127,7 @@ static int wake_exceptional_entry_func(wait_queue_entry_t *wait, unsigned int mo | |||
127 | * correct waitqueue where tasks might be waiting for that old 'entry' and | 127 | * correct waitqueue where tasks might be waiting for that old 'entry' and |
128 | * wake them. | 128 | * wake them. |
129 | */ | 129 | */ |
130 | void dax_wake_mapping_entry_waiter(struct address_space *mapping, | 130 | static void dax_wake_mapping_entry_waiter(struct address_space *mapping, |
131 | pgoff_t index, void *entry, bool wake_all) | 131 | pgoff_t index, void *entry, bool wake_all) |
132 | { | 132 | { |
133 | struct exceptional_entry_key key; | 133 | struct exceptional_entry_key key; |
diff --git a/include/linux/dax.h b/include/linux/dax.h index b3518559f0da..319e0d997446 100644 --- a/include/linux/dax.h +++ b/include/linux/dax.h | |||
@@ -123,8 +123,6 @@ int dax_iomap_fault(struct vm_fault *vmf, enum page_entry_size pe_size, | |||
123 | int dax_delete_mapping_entry(struct address_space *mapping, pgoff_t index); | 123 | int dax_delete_mapping_entry(struct address_space *mapping, pgoff_t index); |
124 | int dax_invalidate_mapping_entry_sync(struct address_space *mapping, | 124 | int dax_invalidate_mapping_entry_sync(struct address_space *mapping, |
125 | pgoff_t index); | 125 | pgoff_t index); |
126 | void dax_wake_mapping_entry_waiter(struct address_space *mapping, | ||
127 | pgoff_t index, void *entry, bool wake_all); | ||
128 | 126 | ||
129 | #ifdef CONFIG_FS_DAX | 127 | #ifdef CONFIG_FS_DAX |
130 | int __dax_zero_page_range(struct block_device *bdev, | 128 | int __dax_zero_page_range(struct block_device *bdev, |
diff --git a/mm/filemap.c b/mm/filemap.c index 65b4b6e7f7bd..dad935769055 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -130,17 +130,8 @@ static int page_cache_tree_insert(struct address_space *mapping, | |||
130 | return -EEXIST; | 130 | return -EEXIST; |
131 | 131 | ||
132 | mapping->nrexceptional--; | 132 | mapping->nrexceptional--; |
133 | if (!dax_mapping(mapping)) { | 133 | if (shadowp) |
134 | if (shadowp) | 134 | *shadowp = p; |
135 | *shadowp = p; | ||
136 | } else { | ||
137 | /* DAX can replace empty locked entry with a hole */ | ||
138 | WARN_ON_ONCE(p != | ||
139 | dax_radix_locked_entry(0, RADIX_DAX_EMPTY)); | ||
140 | /* Wakeup waiters for exceptional entry lock */ | ||
141 | dax_wake_mapping_entry_waiter(mapping, page->index, p, | ||
142 | true); | ||
143 | } | ||
144 | } | 135 | } |
145 | __radix_tree_replace(&mapping->page_tree, node, slot, page, | 136 | __radix_tree_replace(&mapping->page_tree, node, slot, page, |
146 | workingset_update_node, mapping); | 137 | workingset_update_node, mapping); |