aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-05-21 20:38:29 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-05-21 20:38:29 -0700
commit581ae915a3e17cbee9e393d4cf1e877b08b8a7a1 (patch)
tree05efbc3831b1f02c355272f68d1e017d9bc71685 /mm
parent2b590e8513e1ec259211630c21ef68f3ba2ded73 (diff)
downloadhistory-581ae915a3e17cbee9e393d4cf1e877b08b8a7a1.tar.gz
[PATCH] Sanitise handling of unneeded syscall stubs
From: David Mosberger <davidm@napali.hpl.hp.com> Below is a patch that tries to sanitize the dropping of unneeded system-call stubs in generic code. In some instances, it would be possible to move the optional system-call stubs into a library routine which would avoid the need for #ifdefs, but in many cases, doing so would require making several functions global (and possibly exporting additional data-structures in header-files). Furthermore, it would inhibit (automatic) inlining in the cases in the cases where the stubs are needed. For these reasons, the patch keeps the #ifdef-approach. This has been tested on ia64 and there were no objections from the arch-maintainers (and one positive response). The patch should be safe but arch-maintainers may want to take a second look to see if some __ARCH_WANT_foo macros should be removed for their architecture (I'm quite sure that's the case, but I wanted to play it safe and only preserved the status-quo in that regard).
Diffstat (limited to 'mm')
-rw-r--r--mm/fadvise.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mm/fadvise.c b/mm/fadvise.c
index e6d1c32d85feb1..f479387a548615 100644
--- a/mm/fadvise.c
+++ b/mm/fadvise.c
@@ -16,6 +16,8 @@
#include <linux/pagevec.h>
#include <linux/fadvise.h>
+#include <asm/unistd.h>
+
/*
* POSIX_FADV_WILLNEED could set PG_Referenced, and POSIX_FADV_NOREUSE could
* deactivate the pages and clear PG_Referenced.
@@ -98,8 +100,11 @@ out:
return ret;
}
+#ifdef __ARCH_WANT_SYS_FADVISE64
+
asmlinkage long sys_fadvise64(int fd, loff_t offset, size_t len, int advice)
{
return sys_fadvise64_64(fd, offset, len, advice);
}
+#endif