aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/fadvise.c4
-rw-r--r--mm/madvise.c5
2 files changed, 9 insertions, 0 deletions
diff --git a/mm/fadvise.c b/mm/fadvise.c
index 57264d74b8bf..5f19e87bc5af 100644
--- a/mm/fadvise.c
+++ b/mm/fadvise.c
@@ -43,6 +43,10 @@ asmlinkage long sys_fadvise64_64(int fd, loff_t offset, loff_t len, int advice)
43 goto out; 43 goto out;
44 } 44 }
45 45
46 if (mapping->a_ops->get_xip_page)
47 /* no bad return value, but ignore advice */
48 goto out;
49
46 /* Careful about overflows. Len == 0 means "as much as possible" */ 50 /* Careful about overflows. Len == 0 means "as much as possible" */
47 endbyte = offset + len; 51 endbyte = offset + len;
48 if (!len || endbyte < len) 52 if (!len || endbyte < len)
diff --git a/mm/madvise.c b/mm/madvise.c
index 54a5d3bc55d5..73180a22877e 100644
--- a/mm/madvise.c
+++ b/mm/madvise.c
@@ -86,6 +86,11 @@ static long madvise_willneed(struct vm_area_struct * vma,
86 if (!file) 86 if (!file)
87 return -EBADF; 87 return -EBADF;
88 88
89 if (file->f_mapping->a_ops->get_xip_page) {
90 /* no bad return value, but ignore advice */
91 return 0;
92 }
93
89 *prev = vma; 94 *prev = vma;
90 start = ((start - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff; 95 start = ((start - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff;
91 if (end > vma->vm_end) 96 if (end > vma->vm_end)