diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-07-13 19:20:49 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-07-15 09:12:23 -0400 |
commit | 9e00abc3c20904fd6a5d888bb7023925799ec8a5 (patch) | |
tree | ea6f8749fa21e5b23f02b36c3a82e405b495af0b /include/linux/sunrpc | |
parent | 1f9453578f059d2651aa6c6b16756627fc9f2a74 (diff) |
SUNRPC: sunrpc should not explicitly depend on NFS config options
Change explicit references to CONFIG_NFS_V4_1 to implicit ones
Get rid of the unnecessary defines in backchannel_rqst.c and
bc_svc.c: the Makefile takes care of those dependency.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r-- | include/linux/sunrpc/bc_xprt.h | 6 | ||||
-rw-r--r-- | include/linux/sunrpc/svc.h | 4 | ||||
-rw-r--r-- | include/linux/sunrpc/xprt.h | 16 |
3 files changed, 13 insertions, 13 deletions
diff --git a/include/linux/sunrpc/bc_xprt.h b/include/linux/sunrpc/bc_xprt.h index 082884295f80..f7f3ce340c08 100644 --- a/include/linux/sunrpc/bc_xprt.h +++ b/include/linux/sunrpc/bc_xprt.h | |||
@@ -31,7 +31,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |||
31 | #include <linux/sunrpc/xprt.h> | 31 | #include <linux/sunrpc/xprt.h> |
32 | #include <linux/sunrpc/sched.h> | 32 | #include <linux/sunrpc/sched.h> |
33 | 33 | ||
34 | #ifdef CONFIG_NFS_V4_1 | 34 | #ifdef CONFIG_SUNRPC_BACKCHANNEL |
35 | struct rpc_rqst *xprt_alloc_bc_request(struct rpc_xprt *xprt); | 35 | struct rpc_rqst *xprt_alloc_bc_request(struct rpc_xprt *xprt); |
36 | void xprt_free_bc_request(struct rpc_rqst *req); | 36 | void xprt_free_bc_request(struct rpc_rqst *req); |
37 | int xprt_setup_backchannel(struct rpc_xprt *, unsigned int min_reqs); | 37 | int xprt_setup_backchannel(struct rpc_xprt *, unsigned int min_reqs); |
@@ -47,7 +47,7 @@ static inline int svc_is_backchannel(const struct svc_rqst *rqstp) | |||
47 | return 1; | 47 | return 1; |
48 | return 0; | 48 | return 0; |
49 | } | 49 | } |
50 | #else /* CONFIG_NFS_V4_1 */ | 50 | #else /* CONFIG_SUNRPC_BACKCHANNEL */ |
51 | static inline int xprt_setup_backchannel(struct rpc_xprt *xprt, | 51 | static inline int xprt_setup_backchannel(struct rpc_xprt *xprt, |
52 | unsigned int min_reqs) | 52 | unsigned int min_reqs) |
53 | { | 53 | { |
@@ -62,6 +62,6 @@ static inline int svc_is_backchannel(const struct svc_rqst *rqstp) | |||
62 | static inline void xprt_free_bc_request(struct rpc_rqst *req) | 62 | static inline void xprt_free_bc_request(struct rpc_rqst *req) |
63 | { | 63 | { |
64 | } | 64 | } |
65 | #endif /* CONFIG_NFS_V4_1 */ | 65 | #endif /* CONFIG_SUNRPC_BACKCHANNEL */ |
66 | #endif /* _LINUX_SUNRPC_BC_XPRT_H */ | 66 | #endif /* _LINUX_SUNRPC_BC_XPRT_H */ |
67 | 67 | ||
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index ea29330b78bd..9a3fa7baf4b8 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -92,7 +92,7 @@ struct svc_serv { | |||
92 | struct module * sv_module; /* optional module to count when | 92 | struct module * sv_module; /* optional module to count when |
93 | * adding threads */ | 93 | * adding threads */ |
94 | svc_thread_fn sv_function; /* main function for threads */ | 94 | svc_thread_fn sv_function; /* main function for threads */ |
95 | #if defined(CONFIG_NFS_V4_1) | 95 | #if defined(CONFIG_SUNRPC_BACKCHANNEL) |
96 | struct list_head sv_cb_list; /* queue for callback requests | 96 | struct list_head sv_cb_list; /* queue for callback requests |
97 | * that arrive over the same | 97 | * that arrive over the same |
98 | * connection */ | 98 | * connection */ |
@@ -100,7 +100,7 @@ struct svc_serv { | |||
100 | wait_queue_head_t sv_cb_waitq; /* sleep here if there are no | 100 | wait_queue_head_t sv_cb_waitq; /* sleep here if there are no |
101 | * entries in the svc_cb_list */ | 101 | * entries in the svc_cb_list */ |
102 | struct svc_xprt *sv_bc_xprt; /* callback on fore channel */ | 102 | struct svc_xprt *sv_bc_xprt; /* callback on fore channel */ |
103 | #endif /* CONFIG_NFS_V4_1 */ | 103 | #endif /* CONFIG_SUNRPC_BACKCHANNEL */ |
104 | }; | 104 | }; |
105 | 105 | ||
106 | /* | 106 | /* |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 81cce3b3ee66..217b0206581b 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
@@ -100,11 +100,11 @@ struct rpc_rqst { | |||
100 | ktime_t rq_xtime; /* transmit time stamp */ | 100 | ktime_t rq_xtime; /* transmit time stamp */ |
101 | int rq_ntrans; | 101 | int rq_ntrans; |
102 | 102 | ||
103 | #if defined(CONFIG_NFS_V4_1) | 103 | #if defined(CONFIG_SUNRPC_BACKCHANNEL) |
104 | struct list_head rq_bc_list; /* Callback service list */ | 104 | struct list_head rq_bc_list; /* Callback service list */ |
105 | unsigned long rq_bc_pa_state; /* Backchannel prealloc state */ | 105 | unsigned long rq_bc_pa_state; /* Backchannel prealloc state */ |
106 | struct list_head rq_bc_pa_list; /* Backchannel prealloc list */ | 106 | struct list_head rq_bc_pa_list; /* Backchannel prealloc list */ |
107 | #endif /* CONFIG_NFS_V4_1 */ | 107 | #endif /* CONFIG_SUNRPC_BACKCHANEL */ |
108 | }; | 108 | }; |
109 | #define rq_svec rq_snd_buf.head | 109 | #define rq_svec rq_snd_buf.head |
110 | #define rq_slen rq_snd_buf.len | 110 | #define rq_slen rq_snd_buf.len |
@@ -200,7 +200,7 @@ struct rpc_xprt { | |||
200 | u32 xid; /* Next XID value to use */ | 200 | u32 xid; /* Next XID value to use */ |
201 | struct rpc_task * snd_task; /* Task blocked in send */ | 201 | struct rpc_task * snd_task; /* Task blocked in send */ |
202 | struct svc_xprt *bc_xprt; /* NFSv4.1 backchannel */ | 202 | struct svc_xprt *bc_xprt; /* NFSv4.1 backchannel */ |
203 | #if defined(CONFIG_NFS_V4_1) | 203 | #if defined(CONFIG_SUNRPC_BACKCHANNEL) |
204 | struct svc_serv *bc_serv; /* The RPC service which will */ | 204 | struct svc_serv *bc_serv; /* The RPC service which will */ |
205 | /* process the callback */ | 205 | /* process the callback */ |
206 | unsigned int bc_alloc_count; /* Total number of preallocs */ | 206 | unsigned int bc_alloc_count; /* Total number of preallocs */ |
@@ -208,7 +208,7 @@ struct rpc_xprt { | |||
208 | * items */ | 208 | * items */ |
209 | struct list_head bc_pa_list; /* List of preallocated | 209 | struct list_head bc_pa_list; /* List of preallocated |
210 | * backchannel rpc_rqst's */ | 210 | * backchannel rpc_rqst's */ |
211 | #endif /* CONFIG_NFS_V4_1 */ | 211 | #endif /* CONFIG_SUNRPC_BACKCHANNEL */ |
212 | struct list_head recv; | 212 | struct list_head recv; |
213 | 213 | ||
214 | struct { | 214 | struct { |
@@ -228,15 +228,15 @@ struct rpc_xprt { | |||
228 | const char *address_strings[RPC_DISPLAY_MAX]; | 228 | const char *address_strings[RPC_DISPLAY_MAX]; |
229 | }; | 229 | }; |
230 | 230 | ||
231 | #if defined(CONFIG_NFS_V4_1) | 231 | #if defined(CONFIG_SUNRPC_BACKCHANNEL) |
232 | /* | 232 | /* |
233 | * Backchannel flags | 233 | * Backchannel flags |
234 | */ | 234 | */ |
235 | #define RPC_BC_PA_IN_USE 0x0001 /* Preallocated backchannel */ | 235 | #define RPC_BC_PA_IN_USE 0x0001 /* Preallocated backchannel */ |
236 | /* buffer in use */ | 236 | /* buffer in use */ |
237 | #endif /* CONFIG_NFS_V4_1 */ | 237 | #endif /* CONFIG_SUNRPC_BACKCHANNEL */ |
238 | 238 | ||
239 | #if defined(CONFIG_NFS_V4_1) | 239 | #if defined(CONFIG_SUNRPC_BACKCHANNEL) |
240 | static inline int bc_prealloc(struct rpc_rqst *req) | 240 | static inline int bc_prealloc(struct rpc_rqst *req) |
241 | { | 241 | { |
242 | return test_bit(RPC_BC_PA_IN_USE, &req->rq_bc_pa_state); | 242 | return test_bit(RPC_BC_PA_IN_USE, &req->rq_bc_pa_state); |
@@ -246,7 +246,7 @@ static inline int bc_prealloc(struct rpc_rqst *req) | |||
246 | { | 246 | { |
247 | return 0; | 247 | return 0; |
248 | } | 248 | } |
249 | #endif /* CONFIG_NFS_V4_1 */ | 249 | #endif /* CONFIG_SUNRPC_BACKCHANNEL */ |
250 | 250 | ||
251 | struct xprt_create { | 251 | struct xprt_create { |
252 | int ident; /* XPRT_TRANSPORT identifier */ | 252 | int ident; /* XPRT_TRANSPORT identifier */ |