projects/linux·commit 3c761ea0

Fix autofs compile without CONFIG_COMPAT

3c761ea0 · Linus Torvalds <[email protected]> · 2012-02-26 09:44:55 -08:00

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 <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
3c761ea05a8900a907f32b628611873f6bef24b2
Parents
6b21d18e

Changes

1 files changed · +4 −0

FileStatusAddDelContent
include/linux/compat.hmodified+4−0View file

include/linux/compat.h

View file
diff --git a/include/linux/compat.h b/include/linux/compat.h
index 41c9f65..7e05fce 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -561,5 +561,9 @@ asmlinkage ssize_t compat_sys_process_vm_writev(compat_pid_t pid,
unsigned long liovcnt, const struct compat_iovec __user *rvec,
unsigned long riovcnt, unsigned long flags);
+#else
+
+#define is_compat_task() (0)
+
#endif /* CONFIG_COMPAT */
#endif /* _LINUX_COMPAT_H */