aboutsummaryrefslogtreecommitdiffstats
path: root/fs/compat.c
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2014-03-03 04:44:03 -0500
committerHeiko Carstens <heiko.carstens@de.ibm.com>2014-03-04 03:05:33 -0500
commit0473c9b5f05948df780bbc7b996dd7aefc4ec41d (patch)
tree3413bbef3bcaa444bb051f7a9c9de9579d0e0374 /fs/compat.c
parent0414855fdc4a40da05221fc6062cccbc0c30f169 (diff)
compat: let architectures define __ARCH_WANT_COMPAT_SYS_GETDENTS64
For architecture dependent compat syscalls in common code an architecture must define something like __ARCH_WANT_<WHATEVER> if it wants to use the code. This however is not true for compat_sys_getdents64 for which architectures must define __ARCH_OMIT_COMPAT_SYS_GETDENTS64 if they do not want the code. This leads to the situation where all architectures, except mips, get the compat code but only x86_64, arm64 and the generic syscall architectures actually use it. So invert the logic, so that architectures actively must do something to get the compat code. This way a couple of architectures get rid of otherwise dead code. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'fs/compat.c')
-rw-r--r--fs/compat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/compat.c b/fs/compat.c
index 6af20de2c1a3..0095a6978eef 100644
--- a/fs/compat.c
+++ b/fs/compat.c
@@ -981,7 +981,7 @@ asmlinkage long compat_sys_getdents(unsigned int fd,
981 return error; 981 return error;
982} 982}
983 983
984#ifndef __ARCH_OMIT_COMPAT_SYS_GETDENTS64 984#ifdef __ARCH_WANT_COMPAT_SYS_GETDENTS64
985 985
986struct compat_getdents_callback64 { 986struct compat_getdents_callback64 {
987 struct dir_context ctx; 987 struct dir_context ctx;
@@ -1066,7 +1066,7 @@ asmlinkage long compat_sys_getdents64(unsigned int fd,
1066 fdput(f); 1066 fdput(f);
1067 return error; 1067 return error;
1068} 1068}
1069#endif /* ! __ARCH_OMIT_COMPAT_SYS_GETDENTS64 */ 1069#endif /* __ARCH_WANT_COMPAT_SYS_GETDENTS64 */
1070 1070
1071/* 1071/*
1072 * Exactly like fs/open.c:sys_open(), except that it doesn't set the 1072 * Exactly like fs/open.c:sys_open(), except that it doesn't set the