Commit 3c3622dcb64c76c9abd2e468f802db9ba523421c
Committed by
Linus Torvalds
1 parent
e3621ee633
Exists in
master
and in
4 other branches
Fix compile issues in fs/compat_ioctl.c when CONFIG_BLOCK is disabled
Fix fs/compat_ioctl.c to handle CONFIG_BLOCK=n, CONFIG_SCSI=n to avoid build errors: In file included from include/scsi/scsi.h:12, from fs/compat_ioctl.c:71: include/scsi/scsi_cmnd.h:27:25: warning: "BLK_MAX_CDB" is not defined include/scsi/scsi_cmnd.h:28:3: error: #error MAX_COMMAND_SIZE can not be bigger than BLK_MAX_CDB In file included from include/scsi/scsi.h:12, from fs/compat_ioctl.c:71: include/scsi/scsi_cmnd.h: In function 'scsi_bidi_cmnd': include/scsi/scsi_cmnd.h:182: error: implicit declaration of function 'blk_bidi_rq' include/scsi/scsi_cmnd.h:183: error: dereferencing pointer to incomplete type include/scsi/scsi_cmnd.h: In function 'scsi_in': include/scsi/scsi_cmnd.h:189: error: dereferencing pointer to incomplete type Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 6 additions and 0 deletions Side-by-side Diff
fs/compat_ioctl.c
... | ... | @@ -69,9 +69,11 @@ |
69 | 69 | #include <linux/capi.h> |
70 | 70 | #include <linux/gigaset_dev.h> |
71 | 71 | |
72 | +#ifdef CONFIG_BLOCK | |
72 | 73 | #include <scsi/scsi.h> |
73 | 74 | #include <scsi/scsi_ioctl.h> |
74 | 75 | #include <scsi/sg.h> |
76 | +#endif | |
75 | 77 | |
76 | 78 | #include <asm/uaccess.h> |
77 | 79 | #include <linux/ethtool.h> |
... | ... | @@ -2024,6 +2026,7 @@ |
2024 | 2026 | COMPATIBLE_IOCTL(PIO_UNISCRNMAP) |
2025 | 2027 | COMPATIBLE_IOCTL(PIO_FONTRESET) |
2026 | 2028 | COMPATIBLE_IOCTL(PIO_UNIMAPCLR) |
2029 | +#ifdef CONFIG_BLOCK | |
2027 | 2030 | /* Big S */ |
2028 | 2031 | COMPATIBLE_IOCTL(SCSI_IOCTL_GET_IDLUN) |
2029 | 2032 | COMPATIBLE_IOCTL(SCSI_IOCTL_DOORLOCK) |
... | ... | @@ -2033,6 +2036,7 @@ |
2033 | 2036 | COMPATIBLE_IOCTL(SCSI_IOCTL_SEND_COMMAND) |
2034 | 2037 | COMPATIBLE_IOCTL(SCSI_IOCTL_PROBE_HOST) |
2035 | 2038 | COMPATIBLE_IOCTL(SCSI_IOCTL_GET_PCI) |
2039 | +#endif | |
2036 | 2040 | /* Big T */ |
2037 | 2041 | COMPATIBLE_IOCTL(TUNSETNOCSUM) |
2038 | 2042 | COMPATIBLE_IOCTL(TUNSETDEBUG) |
... | ... | @@ -2103,6 +2107,7 @@ |
2103 | 2107 | COMPATIBLE_IOCTL(SIOCSIFVLAN) |
2104 | 2108 | COMPATIBLE_IOCTL(SIOCBRADDBR) |
2105 | 2109 | COMPATIBLE_IOCTL(SIOCBRDELBR) |
2110 | +#ifdef CONFIG_BLOCK | |
2106 | 2111 | /* SG stuff */ |
2107 | 2112 | COMPATIBLE_IOCTL(SG_SET_TIMEOUT) |
2108 | 2113 | COMPATIBLE_IOCTL(SG_GET_TIMEOUT) |
... | ... | @@ -2127,6 +2132,7 @@ |
2127 | 2132 | COMPATIBLE_IOCTL(SG_GET_REQUEST_TABLE) |
2128 | 2133 | COMPATIBLE_IOCTL(SG_SET_KEEP_ORPHAN) |
2129 | 2134 | COMPATIBLE_IOCTL(SG_GET_KEEP_ORPHAN) |
2135 | +#endif | |
2130 | 2136 | /* PPP stuff */ |
2131 | 2137 | COMPATIBLE_IOCTL(PPPIOCGFLAGS) |
2132 | 2138 | COMPATIBLE_IOCTL(PPPIOCSFLAGS) |