summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-02-26 09:44:55 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-03-04 09:49:22 -0800
commit25d10dda10aa6684c0a48c93a97a85181d53add9 (patch)
tree3b0c9bf2fe7d364bbedcd5d9208148a67dc5fd2b
parent82e43e2a64739caf323ac98641e1250c3808c300 (diff)
Fix autofs compile without CONFIG_COMPAT
commit 3c761ea05a8900a907f32b628611873f6bef24b2 upstream. The autofs compat handling fix caused a compile failure when CONFIG_COMPAT isn't defined. Instead of adding random #ifdef'fery in autofs, let's just make the compat helpers earlier to use: without CONFIG_COMPAT, is_compat_task() just hardcodes to zero. We could probably do something similar for a number of other cases where we have #ifdef's in code, but this is the low-hanging fruit. Reported-and-tested-by: Andreas Schwab <schwab@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--include/linux/compat.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/compat.h b/include/linux/compat.h
index cab23f2da4dc..510266f7c366 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -311,5 +311,9 @@ asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename,
extern void __user *compat_alloc_user_space(unsigned long len);
+#else
+
+#define is_compat_task() (0)
+
#endif /* CONFIG_COMPAT */
#endif /* _LINUX_COMPAT_H */