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
Showing the changes to include (1 of 3 files). Show all
Unified · Split
| @@ -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 | ||
| 10 | typedef unsigned long dax_entry_t; | ||
| 11 | |||
| 10 | struct iomap_ops; | 12 | struct iomap_ops; |
| 11 | struct dax_device; | 13 | struct dax_device; |
| 12 | struct dax_operations { | 14 | struct 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 | ||
| 90 | struct page *dax_layout_busy_page(struct address_space *mapping); | 92 | struct page *dax_layout_busy_page(struct address_space *mapping); |
| 91 | bool dax_lock_mapping_entry(struct page *page); | 93 | dax_entry_t dax_lock_page(struct page *page); |
| 92 | void dax_unlock_mapping_entry(struct page *page); | 94 | void dax_unlock_page(struct page *page, dax_entry_t cookie); |
| 93 | #else | 95 | #else |
| 94 | static inline bool bdev_dax_supported(struct block_device *bdev, | 96 | static 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 | ||
| 125 | static inline bool dax_lock_mapping_entry(struct page *page) | 127 | static 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 | ||
| 132 | static inline void dax_unlock_mapping_entry(struct page *page) | 134 | static inline void dax_unlock_page(struct page *page, dax_entry_t cookie) |
| 133 | { | 135 | { |
| 134 | } | 136 | } |
| 135 | #endif | 137 | #endif |