diff options
| author | Tony Lindgren <tony@atomide.com> | 2018-08-28 12:58:03 -0400 |
|---|---|---|
| committer | Tony Lindgren <tony@atomide.com> | 2018-08-28 12:58:03 -0400 |
| commit | ea4d65f14f6aaa53e379b93c5544245ef081b3e7 (patch) | |
| tree | a15485f4f1cf547a52b31fa8e16e14b9579b7200 /include/linux/dax.h | |
| parent | ce32d59ee2cd036f6e8a6ed17a06a0b0bec5c67c (diff) | |
| parent | 496f3347d834aec91c38b45d6249ed00f58ad233 (diff) | |
Merge branch 'perm-fix' into omap-for-v4.19/fixes-v2
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); |
