diff options
Diffstat (limited to 'drivers/md/dm-linear.c')
| -rw-r--r-- | drivers/md/dm-linear.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/md/dm-linear.c b/drivers/md/dm-linear.c index 99297212eeec..775c06d953b7 100644 --- a/drivers/md/dm-linear.c +++ b/drivers/md/dm-linear.c | |||
| @@ -154,6 +154,7 @@ static int linear_iterate_devices(struct dm_target *ti, | |||
| 154 | return fn(ti, lc->dev, lc->start, ti->len, data); | 154 | return fn(ti, lc->dev, lc->start, ti->len, data); |
| 155 | } | 155 | } |
| 156 | 156 | ||
| 157 | #if IS_ENABLED(CONFIG_DAX_DRIVER) | ||
| 157 | static long linear_dax_direct_access(struct dm_target *ti, pgoff_t pgoff, | 158 | static long linear_dax_direct_access(struct dm_target *ti, pgoff_t pgoff, |
| 158 | long nr_pages, void **kaddr, pfn_t *pfn) | 159 | long nr_pages, void **kaddr, pfn_t *pfn) |
| 159 | { | 160 | { |
| @@ -184,6 +185,11 @@ static size_t linear_dax_copy_from_iter(struct dm_target *ti, pgoff_t pgoff, | |||
| 184 | return dax_copy_from_iter(dax_dev, pgoff, addr, bytes, i); | 185 | return dax_copy_from_iter(dax_dev, pgoff, addr, bytes, i); |
| 185 | } | 186 | } |
| 186 | 187 | ||
| 188 | #else | ||
| 189 | #define linear_dax_direct_access NULL | ||
| 190 | #define linear_dax_copy_from_iter NULL | ||
| 191 | #endif | ||
| 192 | |||
| 187 | static struct target_type linear_target = { | 193 | static struct target_type linear_target = { |
| 188 | .name = "linear", | 194 | .name = "linear", |
| 189 | .version = {1, 4, 0}, | 195 | .version = {1, 4, 0}, |
