diff options
author | Carsten Otte <cotte@de.ibm.com> | 2005-06-24 01:05:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-24 03:06:42 -0400 |
commit | fe77ba6f4f97690baa4c756611a07f3cc033f6ae (patch) | |
tree | 01abe2ed3f1ed6f9340f7d9cbad461cbedb47e65 /mm/madvise.c | |
parent | eb6fe0c388e43b02e261f0fdee60e42f6298d7f7 (diff) |
[PATCH] xip: madvice/fadvice: execute in place
Make sys_madvice/fadvice return sane with xip.
Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm/madvise.c')
-rw-r--r-- | mm/madvise.c | 5 |
1 files changed, 5 insertions, 0 deletions
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) |