From fe77ba6f4f97690baa4c756611a07f3cc033f6ae Mon Sep 17 00:00:00 2001 From: Carsten Otte Date: Thu, 23 Jun 2005 22:05:29 -0700 Subject: [PATCH] xip: madvice/fadvice: execute in place Make sys_madvice/fadvice return sane with xip. Signed-off-by: Carsten Otte Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- mm/fadvise.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mm/fadvise.c') 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) -- cgit v1.2.2