Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sunrpc: remove __KERNEL__ ifdefs

Remove the __KERNEL__ ifdefs from the non-UAPI sunrpc headers,
as those can't be included from user space programs.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>

authored by

Christoph Hellwig and committed by
J. Bruce Fields
d05a0201 581ae686

-36
-3
include/linux/sunrpc/auth.h
··· 10 10 #ifndef _LINUX_SUNRPC_AUTH_H 11 11 #define _LINUX_SUNRPC_AUTH_H 12 12 13 - #ifdef __KERNEL__ 14 - 15 13 #include <linux/sunrpc/sched.h> 16 14 #include <linux/sunrpc/msg_prot.h> 17 15 #include <linux/sunrpc/xdr.h> ··· 192 194 return NULL; 193 195 } 194 196 195 - #endif /* __KERNEL__ */ 196 197 #endif /* _LINUX_SUNRPC_AUTH_H */
-2
include/linux/sunrpc/auth_gss.h
··· 13 13 #ifndef _LINUX_SUNRPC_AUTH_GSS_H 14 14 #define _LINUX_SUNRPC_AUTH_GSS_H 15 15 16 - #ifdef __KERNEL__ 17 16 #include <linux/refcount.h> 18 17 #include <linux/sunrpc/auth.h> 19 18 #include <linux/sunrpc/svc.h> ··· 89 90 unsigned long gc_upcall_timestamp; 90 91 }; 91 92 92 - #endif /* __KERNEL__ */ 93 93 #endif /* _LINUX_SUNRPC_AUTH_GSS_H */ 94 94
-3
include/linux/sunrpc/clnt.h
··· 109 109 const char * p_name; /* name of procedure */ 110 110 }; 111 111 112 - #ifdef __KERNEL__ 113 - 114 112 struct rpc_create_args { 115 113 struct net *net; 116 114 int protocol; ··· 235 237 (task->tk_msg.rpc_proc->p_decode != NULL); 236 238 } 237 239 238 - #endif /* __KERNEL__ */ 239 240 #endif /* _LINUX_SUNRPC_CLNT_H */
-2
include/linux/sunrpc/gss_api.h
··· 13 13 #ifndef _LINUX_SUNRPC_GSS_API_H 14 14 #define _LINUX_SUNRPC_GSS_API_H 15 15 16 - #ifdef __KERNEL__ 17 16 #include <linux/sunrpc/xdr.h> 18 17 #include <linux/sunrpc/msg_prot.h> 19 18 #include <linux/uio.h> ··· 159 160 * corresponding call to gss_mech_put. */ 160 161 void gss_mech_put(struct gss_api_mech *); 161 162 162 - #endif /* __KERNEL__ */ 163 163 #endif /* _LINUX_SUNRPC_GSS_API_H */ 164 164
-3
include/linux/sunrpc/gss_err.h
··· 34 34 #ifndef _LINUX_SUNRPC_GSS_ERR_H 35 35 #define _LINUX_SUNRPC_GSS_ERR_H 36 36 37 - #ifdef __KERNEL__ 38 - 39 37 typedef unsigned int OM_uint32; 40 38 41 39 /* ··· 161 163 /* XXXX This is a necessary evil until the spec is fixed */ 162 164 #define GSS_S_CRED_UNAVAIL GSS_S_FAILURE 163 165 164 - #endif /* __KERNEL__ */ 165 166 #endif /* __LINUX_SUNRPC_GSS_ERR_H */
-3
include/linux/sunrpc/msg_prot.h
··· 8 8 #ifndef _LINUX_SUNRPC_MSGPROT_H_ 9 9 #define _LINUX_SUNRPC_MSGPROT_H_ 10 10 11 - #ifdef __KERNEL__ /* user programs should get these from the rpc header files */ 12 - 13 11 #define RPC_VERSION 2 14 12 15 13 /* size of an XDR encoding unit in bytes, i.e. 32bit */ ··· 215 217 /* Assume INET6_ADDRSTRLEN will always be larger than INET_ADDRSTRLEN... */ 216 218 #define RPCBIND_MAXUADDRLEN RPCBIND_MAXUADDR6LEN 217 219 218 - #endif /* __KERNEL__ */ 219 220 #endif /* _LINUX_SUNRPC_MSGPROT_H_ */
-3
include/linux/sunrpc/rpc_pipe_fs.h
··· 2 2 #ifndef _LINUX_SUNRPC_RPC_PIPE_FS_H 3 3 #define _LINUX_SUNRPC_RPC_PIPE_FS_H 4 4 5 - #ifdef __KERNEL__ 6 - 7 5 #include <linux/workqueue.h> 8 6 9 7 struct rpc_pipe_dir_head { ··· 130 132 131 133 extern bool gssd_running(struct net *net); 132 134 133 - #endif 134 135 #endif
-4
include/linux/sunrpc/svcauth.h
··· 10 10 #ifndef _LINUX_SUNRPC_SVCAUTH_H_ 11 11 #define _LINUX_SUNRPC_SVCAUTH_H_ 12 12 13 - #ifdef __KERNEL__ 14 - 15 13 #include <linux/string.h> 16 14 #include <linux/sunrpc/msg_prot.h> 17 15 #include <linux/sunrpc/cache.h> ··· 182 184 { 183 185 return full_name_hash(NULL, buf, length) >> (32 - bits); 184 186 } 185 - 186 - #endif /* __KERNEL__ */ 187 187 188 188 #endif /* _LINUX_SUNRPC_SVCAUTH_H_ */
-2
include/linux/sunrpc/svcauth_gss.h
··· 9 9 #ifndef _LINUX_SUNRPC_SVCAUTH_GSS_H 10 10 #define _LINUX_SUNRPC_SVCAUTH_GSS_H 11 11 12 - #ifdef __KERNEL__ 13 12 #include <linux/sched.h> 14 13 #include <linux/sunrpc/types.h> 15 14 #include <linux/sunrpc/xdr.h> ··· 23 24 int svcauth_gss_register_pseudoflavor(u32 pseudoflavor, char * name); 24 25 u32 svcauth_gss_flavor(struct auth_domain *dom); 25 26 26 - #endif /* __KERNEL__ */ 27 27 #endif /* _LINUX_SUNRPC_SVCAUTH_GSS_H */
-3
include/linux/sunrpc/xdr.h
··· 11 11 #ifndef _SUNRPC_XDR_H_ 12 12 #define _SUNRPC_XDR_H_ 13 13 14 - #ifdef __KERNEL__ 15 - 16 14 #include <linux/uio.h> 17 15 #include <asm/byteorder.h> 18 16 #include <asm/unaligned.h> ··· 550 552 *array = be32_to_cpup(p); 551 553 return retval; 552 554 } 553 - #endif /* __KERNEL__ */ 554 555 555 556 #endif /* _SUNRPC_XDR_H_ */
-4
include/linux/sunrpc/xprt.h
··· 19 19 #include <linux/sunrpc/xdr.h> 20 20 #include <linux/sunrpc/msg_prot.h> 21 21 22 - #ifdef __KERNEL__ 23 - 24 22 #define RPC_MIN_SLOT_TABLE (2U) 25 23 #define RPC_DEF_SLOT_TABLE (16U) 26 24 #define RPC_MAX_SLOT_TABLE_LIMIT (65536U) ··· 502 504 { 503 505 } 504 506 #endif 505 - 506 - #endif /* __KERNEL__*/ 507 507 508 508 #endif /* _LINUX_SUNRPC_XPRT_H */
-4
include/linux/sunrpc/xprtsock.h
··· 8 8 #ifndef _LINUX_SUNRPC_XPRTSOCK_H 9 9 #define _LINUX_SUNRPC_XPRTSOCK_H 10 10 11 - #ifdef __KERNEL__ 12 - 13 11 int init_socket_xprt(void); 14 12 void cleanup_socket_xprt(void); 15 13 ··· 87 89 #define XPRT_SOCK_WAKE_WRITE (5) 88 90 #define XPRT_SOCK_WAKE_PENDING (6) 89 91 #define XPRT_SOCK_WAKE_DISCONNECT (7) 90 - 91 - #endif /* __KERNEL__ */ 92 92 93 93 #endif /* _LINUX_SUNRPC_XPRTSOCK_H */