diff options
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r-- | include/linux/sunrpc/metrics.h | 12 | ||||
-rw-r--r-- | include/linux/sunrpc/svc.h | 9 | ||||
-rw-r--r-- | include/linux/sunrpc/xprt.h | 1 |
3 files changed, 18 insertions, 4 deletions
diff --git a/include/linux/sunrpc/metrics.h b/include/linux/sunrpc/metrics.h index 8f96e9dc369a..77f78e56c481 100644 --- a/include/linux/sunrpc/metrics.h +++ b/include/linux/sunrpc/metrics.h | |||
@@ -69,9 +69,21 @@ struct rpc_clnt; | |||
69 | /* | 69 | /* |
70 | * EXPORTed functions for managing rpc_iostats structures | 70 | * EXPORTed functions for managing rpc_iostats structures |
71 | */ | 71 | */ |
72 | |||
73 | #ifdef CONFIG_PROC_FS | ||
74 | |||
72 | struct rpc_iostats * rpc_alloc_iostats(struct rpc_clnt *); | 75 | struct rpc_iostats * rpc_alloc_iostats(struct rpc_clnt *); |
73 | void rpc_count_iostats(struct rpc_task *); | 76 | void rpc_count_iostats(struct rpc_task *); |
74 | void rpc_print_iostats(struct seq_file *, struct rpc_clnt *); | 77 | void rpc_print_iostats(struct seq_file *, struct rpc_clnt *); |
75 | void rpc_free_iostats(struct rpc_iostats *); | 78 | void rpc_free_iostats(struct rpc_iostats *); |
76 | 79 | ||
80 | #else /* CONFIG_PROC_FS */ | ||
81 | |||
82 | static inline struct rpc_iostats *rpc_alloc_iostats(struct rpc_clnt *clnt) { return NULL; } | ||
83 | static inline void rpc_count_iostats(struct rpc_task *task) {} | ||
84 | static inline void rpc_print_iostats(struct seq_file *seq, struct rpc_clnt *clnt) {} | ||
85 | static inline void rpc_free_iostats(struct rpc_iostats *stats) {} | ||
86 | |||
87 | #endif /* CONFIG_PROC_FS */ | ||
88 | |||
77 | #endif /* _LINUX_SUNRPC_METRICS_H */ | 89 | #endif /* _LINUX_SUNRPC_METRICS_H */ |
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 50cab2a09f28..503564384545 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -197,15 +197,16 @@ svc_take_res_page(struct svc_rqst *rqstp) | |||
197 | return rqstp->rq_respages[rqstp->rq_resused++]; | 197 | return rqstp->rq_respages[rqstp->rq_resused++]; |
198 | } | 198 | } |
199 | 199 | ||
200 | static inline int svc_take_page(struct svc_rqst *rqstp) | 200 | static inline void svc_take_page(struct svc_rqst *rqstp) |
201 | { | 201 | { |
202 | if (rqstp->rq_arghi <= rqstp->rq_argused) | 202 | if (rqstp->rq_arghi <= rqstp->rq_argused) { |
203 | return -ENOMEM; | 203 | WARN_ON(1); |
204 | return; | ||
205 | } | ||
204 | rqstp->rq_arghi--; | 206 | rqstp->rq_arghi--; |
205 | rqstp->rq_respages[rqstp->rq_resused] = | 207 | rqstp->rq_respages[rqstp->rq_resused] = |
206 | rqstp->rq_argpages[rqstp->rq_arghi]; | 208 | rqstp->rq_argpages[rqstp->rq_arghi]; |
207 | rqstp->rq_resused++; | 209 | rqstp->rq_resused++; |
208 | return 0; | ||
209 | } | 210 | } |
210 | 211 | ||
211 | static inline void svc_pushback_allpages(struct svc_rqst *rqstp) | 212 | static inline void svc_pushback_allpages(struct svc_rqst *rqstp) |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 7eebbab7160b..e8bbe8118de8 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
@@ -53,6 +53,7 @@ struct rpc_timeout { | |||
53 | 53 | ||
54 | struct rpc_task; | 54 | struct rpc_task; |
55 | struct rpc_xprt; | 55 | struct rpc_xprt; |
56 | struct seq_file; | ||
56 | 57 | ||
57 | /* | 58 | /* |
58 | * This describes a complete RPC request | 59 | * This describes a complete RPC request |