History

Merge tag 'dax-fixes-4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm

Pull dax fixes from Dan Williams: "The last of the known regression fixes and fallout from the Xarray conversion of the filesystem-dax implementation. On the path to debugging why the dax memory-failure injection test started failing after the Xarray conversion a couple more fixes for the dax_lock_mapping_entry(), now called dax_lock_page(), surfaced. Those plus the bug that started the hunt are now addressed. These patches have appeared in a -next release with no issues reported. Note the touches to mm/memory-failure.c are just the conversion to the new function signature for dax_lock_page(). Summary: - Fix the Xarray conversion of fsdax to properly handle dax_lock_mapping_entry() in the presense of pmd entries - Fix inode destruction racing a new lock request" * tag 'dax-fixes-4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: dax: Fix unlock mismatch with updated API dax: Don't access a freed inode dax: Check page->mapping isn't NULL

Linus Torvalds committed 7 years ago

Commit fa82dcb2 parents bd799eb 27359fd3 files · +50 −25Browse files

Showing the changes to include (1 of 3 files). Show all

Unified · Split

include/linux/dax.h+8−6
@@ -7,6 +7,8 @@ · 6 unmodified lines
7#include <linux/radix-tree.h>7#include <linux/radix-tree.h>
8#include <asm/pgtable.h>8#include <asm/pgtable.h>
9 9
10typedef unsigned long dax_entry_t;
11
10struct iomap_ops;12struct iomap_ops;
11struct dax_device;13struct dax_device;
12struct dax_operations {14struct dax_operations {
@@ -88,8 +90,8 @@ int dax_writeback_mapping_range(struct address_space *mapping, · 75 unmodified lines
88 struct block_device *bdev, struct writeback_control *wbc);90 struct block_device *bdev, struct writeback_control *wbc);
89 91
90struct page *dax_layout_busy_page(struct address_space *mapping);92struct page *dax_layout_busy_page(struct address_space *mapping);
91bool dax_lock_mapping_entry(struct page *page);93dax_entry_t dax_lock_page(struct page *page);
92void dax_unlock_mapping_entry(struct page *page);94void dax_unlock_page(struct page *page, dax_entry_t cookie);
93#else95#else
94static inline bool bdev_dax_supported(struct block_device *bdev,96static inline bool bdev_dax_supported(struct block_device *bdev,
95 int blocksize)97 int blocksize)
@@ -122,14 +124,14 @@ static inline int dax_writeback_mapping_range(struct address_space *mapping, · 26 unmodified lines
122 return -EOPNOTSUPP;124 return -EOPNOTSUPP;
123}125}
124 126
125static inline bool dax_lock_mapping_entry(struct page *page)127static inline dax_entry_t dax_lock_page(struct page *page)
126{128{
127 if (IS_DAX(page->mapping->host))129 if (IS_DAX(page->mapping->host))
128 return true;130 return ~0UL;
129 return false;131 return 0;
130}132}
131 133
132static inline void dax_unlock_mapping_entry(struct page *page)134static inline void dax_unlock_page(struct page *page, dax_entry_t cookie)
133{135{
134}136}
135#endif137#endif