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
77 #include <linux/radix-tree.h>
88 #include <asm/pgtable.h>
99
10+typedef unsigned long dax_entry_t;
11+
1012 struct iomap_ops;
1113 struct dax_device;
1214 struct dax_operations {
@@ -88,8 +90,8 @@ int dax_writeback_mapping_range(struct address_space *mapping, · 75 unmodified lines
8890 struct block_device *bdev, struct writeback_control *wbc);
8991
9092 struct page *dax_layout_busy_page(struct address_space *mapping);
91−bool dax_lock_mapping_entry(struct page *page);
92−void dax_unlock_mapping_entry(struct page *page);
93+dax_entry_t dax_lock_page(struct page *page);
94+void dax_unlock_page(struct page *page, dax_entry_t cookie);
9395 #else
9496 static inline bool bdev_dax_supported(struct block_device *bdev,
9597 int blocksize)
@@ -122,14 +124,14 @@ static inline int dax_writeback_mapping_range(struct address_space *mapping, · 26 unmodified lines
122124 return -EOPNOTSUPP;
123125 }
124126
125−static inline bool dax_lock_mapping_entry(struct page *page)
127+static inline dax_entry_t dax_lock_page(struct page *page)
126128 {
127129 if (IS_DAX(page->mapping->host))
128− return true;
129− return false;
130+ return ~0UL;
131+ return 0;
130132 }
131133
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)
133135 {
134136 }
135137 #endif