aboutsummaryrefslogtreecommitdiffstats
path: root/mm/frame_vector.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/frame_vector.c')
-rw-r--r--mm/frame_vector.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/mm/frame_vector.c b/mm/frame_vector.c
index 2f98df0d460e..297c7238f7d4 100644
--- a/mm/frame_vector.c
+++ b/mm/frame_vector.c
@@ -53,6 +53,18 @@ int get_vaddr_frames(unsigned long start, unsigned int nr_frames,
53 ret = -EFAULT; 53 ret = -EFAULT;
54 goto out; 54 goto out;
55 } 55 }
56
57 /*
58 * While get_vaddr_frames() could be used for transient (kernel
59 * controlled lifetime) pinning of memory pages all current
60 * users establish long term (userspace controlled lifetime)
61 * page pinning. Treat get_vaddr_frames() like
62 * get_user_pages_longterm() and disallow it for filesystem-dax
63 * mappings.
64 */
65 if (vma_is_fsdax(vma))
66 return -EOPNOTSUPP;
67
56 if (!(vma->vm_flags & (VM_IO | VM_PFNMAP))) { 68 if (!(vma->vm_flags & (VM_IO | VM_PFNMAP))) {
57 vec->got_ref = true; 69 vec->got_ref = true;
58 vec->is_pfns = false; 70 vec->is_pfns = false;