Skip to content

Commit 3c761ea

Browse files
committed
Fix autofs compile without CONFIG_COMPAT
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]>
1 parent 6b21d18 commit 3c761ea

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/linux/compat.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,5 +561,9 @@ asmlinkage ssize_t compat_sys_process_vm_writev(compat_pid_t pid,
561561
unsigned long liovcnt, const struct compat_iovec __user *rvec,
562562
unsigned long riovcnt, unsigned long flags);
563563

564+
#else
565+
566+
#define is_compat_task() (0)
567+
564568
#endif /* CONFIG_COMPAT */
565569
#endif /* _LINUX_COMPAT_H */

0 commit comments

Comments
 (0)