@@ -108,24 +108,15 @@ static inline bool daxdev_mapping_supported(struct vm_area_struct *vma,
108
108
#endif
109
109
110
110
struct writeback_control ;
111
- #if IS_ENABLED (CONFIG_FS_DAX )
111
+ #if defined( CONFIG_BLOCK ) && defined (CONFIG_FS_DAX )
112
112
int dax_add_host (struct dax_device * dax_dev , struct gendisk * disk );
113
113
void dax_remove_host (struct gendisk * disk );
114
-
114
+ struct dax_device * fs_dax_get_by_bdev (struct block_device * bdev ,
115
+ u64 * start_off );
115
116
static inline void fs_put_dax (struct dax_device * dax_dev )
116
117
{
117
118
put_dax (dax_dev );
118
119
}
119
-
120
- struct dax_device * fs_dax_get_by_bdev (struct block_device * bdev ,
121
- u64 * start_off );
122
- int dax_writeback_mapping_range (struct address_space * mapping ,
123
- struct dax_device * dax_dev , struct writeback_control * wbc );
124
-
125
- struct page * dax_layout_busy_page (struct address_space * mapping );
126
- struct page * dax_layout_busy_page_range (struct address_space * mapping , loff_t start , loff_t end );
127
- dax_entry_t dax_lock_page (struct page * page );
128
- void dax_unlock_page (struct page * page , dax_entry_t cookie );
129
120
#else
130
121
static inline int dax_add_host (struct dax_device * dax_dev , struct gendisk * disk )
131
122
{
@@ -134,17 +125,25 @@ static inline int dax_add_host(struct dax_device *dax_dev, struct gendisk *disk)
134
125
static inline void dax_remove_host (struct gendisk * disk )
135
126
{
136
127
}
137
-
138
- static inline void fs_put_dax (struct dax_device * dax_dev )
139
- {
140
- }
141
-
142
128
static inline struct dax_device * fs_dax_get_by_bdev (struct block_device * bdev ,
143
129
u64 * start_off )
144
130
{
145
131
return NULL ;
146
132
}
133
+ static inline void fs_put_dax (struct dax_device * dax_dev )
134
+ {
135
+ }
136
+ #endif /* CONFIG_BLOCK && CONFIG_FS_DAX */
147
137
138
+ #if IS_ENABLED (CONFIG_FS_DAX )
139
+ int dax_writeback_mapping_range (struct address_space * mapping ,
140
+ struct dax_device * dax_dev , struct writeback_control * wbc );
141
+
142
+ struct page * dax_layout_busy_page (struct address_space * mapping );
143
+ struct page * dax_layout_busy_page_range (struct address_space * mapping , loff_t start , loff_t end );
144
+ dax_entry_t dax_lock_page (struct page * page );
145
+ void dax_unlock_page (struct page * page , dax_entry_t cookie );
146
+ #else
148
147
static inline struct page * dax_layout_busy_page (struct address_space * mapping )
149
148
{
150
149
return NULL ;
0 commit comments