diff options
Diffstat (limited to 'include/linux/dax.h')
-rw-r--r-- | include/linux/dax.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/dax.h b/include/linux/dax.h index deb0f663252f..450b28db9533 100644 --- a/include/linux/dax.h +++ b/include/linux/dax.h | |||
@@ -88,6 +88,8 @@ int dax_writeback_mapping_range(struct address_space *mapping, | |||
88 | struct block_device *bdev, struct writeback_control *wbc); | 88 | struct block_device *bdev, struct writeback_control *wbc); |
89 | 89 | ||
90 | struct page *dax_layout_busy_page(struct address_space *mapping); | 90 | 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); | ||
91 | #else | 93 | #else |
92 | static inline bool bdev_dax_supported(struct block_device *bdev, | 94 | static inline bool bdev_dax_supported(struct block_device *bdev, |
93 | int blocksize) | 95 | int blocksize) |
@@ -119,6 +121,17 @@ static inline int dax_writeback_mapping_range(struct address_space *mapping, | |||
119 | { | 121 | { |
120 | return -EOPNOTSUPP; | 122 | return -EOPNOTSUPP; |
121 | } | 123 | } |
124 | |||
125 | static inline bool dax_lock_mapping_entry(struct page *page) | ||
126 | { | ||
127 | if (IS_DAX(page->mapping->host)) | ||
128 | return true; | ||
129 | return false; | ||
130 | } | ||
131 | |||
132 | static inline void dax_unlock_mapping_entry(struct page *page) | ||
133 | { | ||
134 | } | ||
122 | #endif | 135 | #endif |
123 | 136 | ||
124 | int dax_read_lock(void); | 137 | int dax_read_lock(void); |