Commit 3274092b49271e24e1da4d282817822a97591cd7

Authored by Linus Torvalds
Committed by Greg Kroah-Hartman
1 parent cebf41113c

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>

Showing 1 changed file with 4 additions and 0 deletions Side-by-side Diff

include/linux/compat.h
... ... @@ -561,6 +561,10 @@
561 561 unsigned long liovcnt, const struct compat_iovec __user *rvec,
562 562 unsigned long riovcnt, unsigned long flags);
563 563  
  564 +#else
  565 +
  566 +#define is_compat_task() (0)
  567 +
564 568 #endif /* CONFIG_COMPAT */
565 569 #endif /* _LINUX_COMPAT_H */