diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-12-06 15:27:17 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-12-06 15:27:17 +0100 |
commit | e8cd29b774ddd28bfe6d693c82241e294dc91e09 (patch) | |
tree | c8f904220eab7c50771558642b6c6d9240fb5368 /drivers/dax/device.c | |
parent | 7e739297cdbe8383bf4a5e423959107eccc01fa1 (diff) | |
parent | 73996933b53ff396d63a7fccd8e824758634dc19 (diff) | |
download | linux-e8cd29b774ddd28bfe6d693c82241e294dc91e09.tar.bz2 |
Merge Linus's staging merge point into staging-next
This resolves the merge issue pointed out by Stephen in
drivers/iio/adc/meson_saradc.c.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/dax/device.c')
-rw-r--r-- | drivers/dax/device.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/dax/device.c b/drivers/dax/device.c index 6833ada237ab..7b0bf825c4e7 100644 --- a/drivers/dax/device.c +++ b/drivers/dax/device.c @@ -428,9 +428,21 @@ static int dev_dax_fault(struct vm_fault *vmf) return dev_dax_huge_fault(vmf, PE_SIZE_PTE); } +static int dev_dax_split(struct vm_area_struct *vma, unsigned long addr) +{ + struct file *filp = vma->vm_file; + struct dev_dax *dev_dax = filp->private_data; + struct dax_region *dax_region = dev_dax->region; + + if (!IS_ALIGNED(addr, dax_region->align)) + return -EINVAL; + return 0; +} + static const struct vm_operations_struct dax_vm_ops = { .fault = dev_dax_fault, .huge_fault = dev_dax_huge_fault, + .split = dev_dax_split, }; static int dax_mmap(struct file *filp, struct vm_area_struct *vma) |