summaryrefslogtreecommitdiffstats
path: root/mm/fadvise.c
diff options
context:
space:
mode:
authorCarsten Otte <cotte@de.ibm.com>2005-06-23 22:05:29 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-24 00:06:42 -0700
commitfe77ba6f4f97690baa4c756611a07f3cc033f6ae (patch)
tree01abe2ed3f1ed6f9340f7d9cbad461cbedb47e65 /mm/fadvise.c
parenteb6fe0c388e43b02e261f0fdee60e42f6298d7f7 (diff)
downloadlinux-stable-fe77ba6f4f97690baa4c756611a07f3cc033f6ae.tar.gz
linux-stable-fe77ba6f4f97690baa4c756611a07f3cc033f6ae.tar.bz2
linux-stable-fe77ba6f4f97690baa4c756611a07f3cc033f6ae.zip
[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/fadvise.c')
-rw-r--r--mm/fadvise.c4
1 files changed, 4 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)
goto out;
}
+ if (mapping->a_ops->get_xip_page)
+ /* no bad return value, but ignore advice */
+ goto out;
+
/* Careful about overflows. Len == 0 means "as much as possible" */
endbyte = offset + len;
if (!len || endbyte < len)