diff options
Diffstat (limited to 'include/linux/dax.h')
-rw-r--r-- | include/linux/dax.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/include/linux/dax.h b/include/linux/dax.h index 450b28db9533..0dd316a74a29 100644 --- a/include/linux/dax.h +++ b/include/linux/dax.h | |||
@@ -7,6 +7,8 @@ | |||
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, | |||
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, | |||
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 |