aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/lockd/svc.c7
-rw-r--r--fs/nfs/callback.c5
-rw-r--r--fs/nfsd/nfssvc.c6
-rw-r--r--include/linux/sunrpc/svc.h2
-rw-r--r--include/linux/sunrpc/svcsock.h2
-rw-r--r--net/sunrpc/svc.c3
-rw-r--r--net/sunrpc/svcsock.c3
7 files changed, 13 insertions, 15 deletions
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
index 8d19de6a14dc..f0791cff45ac 100644
--- a/fs/lockd/svc.c
+++ b/fs/lockd/svc.c
@@ -98,7 +98,6 @@ static inline void clear_grace_period(void)
98static void 98static void
99lockd(struct svc_rqst *rqstp) 99lockd(struct svc_rqst *rqstp)
100{ 100{
101 struct svc_serv *serv = rqstp->rq_server;
102 int err = 0; 101 int err = 0;
103 unsigned long grace_period_expire; 102 unsigned long grace_period_expire;
104 103
@@ -114,7 +113,7 @@ lockd(struct svc_rqst *rqstp)
114 * Let our maker know we're running. 113 * Let our maker know we're running.
115 */ 114 */
116 nlmsvc_pid = current->pid; 115 nlmsvc_pid = current->pid;
117 nlmsvc_serv = serv; 116 nlmsvc_serv = rqstp->rq_server;
118 complete(&lockd_start_done); 117 complete(&lockd_start_done);
119 118
120 daemonize("lockd"); 119 daemonize("lockd");
@@ -164,7 +163,7 @@ lockd(struct svc_rqst *rqstp)
164 * Find a socket with data available and call its 163 * Find a socket with data available and call its
165 * recvfrom routine. 164 * recvfrom routine.
166 */ 165 */
167 err = svc_recv(serv, rqstp, timeout); 166 err = svc_recv(rqstp, timeout);
168 if (err == -EAGAIN || err == -EINTR) 167 if (err == -EAGAIN || err == -EINTR)
169 continue; 168 continue;
170 if (err < 0) { 169 if (err < 0) {
@@ -177,7 +176,7 @@ lockd(struct svc_rqst *rqstp)
177 dprintk("lockd: request from %08x\n", 176 dprintk("lockd: request from %08x\n",
178 (unsigned)ntohl(rqstp->rq_addr.sin_addr.s_addr)); 177 (unsigned)ntohl(rqstp->rq_addr.sin_addr.s_addr));
179 178
180 svc_process(serv, rqstp); 179 svc_process(rqstp);
181 180
182 } 181 }
183 182
diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c
index e244cdc7afab..7933e2e99dbc 100644
--- a/fs/nfs/callback.c
+++ b/fs/nfs/callback.c
@@ -58,7 +58,6 @@ module_param_call(callback_tcpport, param_set_port, param_get_int,
58 */ 58 */
59static void nfs_callback_svc(struct svc_rqst *rqstp) 59static void nfs_callback_svc(struct svc_rqst *rqstp)
60{ 60{
61 struct svc_serv *serv = rqstp->rq_server;
62 int err; 61 int err;
63 62
64 __module_get(THIS_MODULE); 63 __module_get(THIS_MODULE);
@@ -80,7 +79,7 @@ static void nfs_callback_svc(struct svc_rqst *rqstp)
80 /* 79 /*
81 * Listen for a request on the socket 80 * Listen for a request on the socket
82 */ 81 */
83 err = svc_recv(serv, rqstp, MAX_SCHEDULE_TIMEOUT); 82 err = svc_recv(rqstp, MAX_SCHEDULE_TIMEOUT);
84 if (err == -EAGAIN || err == -EINTR) 83 if (err == -EAGAIN || err == -EINTR)
85 continue; 84 continue;
86 if (err < 0) { 85 if (err < 0) {
@@ -91,7 +90,7 @@ static void nfs_callback_svc(struct svc_rqst *rqstp)
91 } 90 }
92 dprintk("%s: request from %u.%u.%u.%u\n", __FUNCTION__, 91 dprintk("%s: request from %u.%u.%u.%u\n", __FUNCTION__,
93 NIPQUAD(rqstp->rq_addr.sin_addr.s_addr)); 92 NIPQUAD(rqstp->rq_addr.sin_addr.s_addr));
94 svc_process(serv, rqstp); 93 svc_process(rqstp);
95 } 94 }
96 95
97 svc_exit_thread(rqstp); 96 svc_exit_thread(rqstp);
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
index 784f94fbebf3..f1314c63e823 100644
--- a/fs/nfsd/nfssvc.c
+++ b/fs/nfsd/nfssvc.c
@@ -323,7 +323,6 @@ update_thread_usage(int busy_threads)
323static void 323static void
324nfsd(struct svc_rqst *rqstp) 324nfsd(struct svc_rqst *rqstp)
325{ 325{
326 struct svc_serv *serv = rqstp->rq_server;
327 struct fs_struct *fsp; 326 struct fs_struct *fsp;
328 int err; 327 int err;
329 struct nfsd_list me; 328 struct nfsd_list me;
@@ -373,8 +372,7 @@ nfsd(struct svc_rqst *rqstp)
373 * Find a socket with data available and call its 372 * Find a socket with data available and call its
374 * recvfrom routine. 373 * recvfrom routine.
375 */ 374 */
376 while ((err = svc_recv(serv, rqstp, 375 while ((err = svc_recv(rqstp, 60*60*HZ)) == -EAGAIN)
377 60*60*HZ)) == -EAGAIN)
378 ; 376 ;
379 if (err < 0) 377 if (err < 0)
380 break; 378 break;
@@ -387,7 +385,7 @@ nfsd(struct svc_rqst *rqstp)
387 /* Process request with signals blocked. */ 385 /* Process request with signals blocked. */
388 sigprocmask(SIG_SETMASK, &allowed_mask, NULL); 386 sigprocmask(SIG_SETMASK, &allowed_mask, NULL);
389 387
390 svc_process(serv, rqstp); 388 svc_process(rqstp);
391 389
392 /* Unlock export hash tables */ 390 /* Unlock export hash tables */
393 exp_readunlock(); 391 exp_readunlock();
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index bff5e9b486c2..cb341f96eb8d 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -338,7 +338,7 @@ struct svc_serv * svc_create(struct svc_program *, unsigned int,
338int svc_create_thread(svc_thread_fn, struct svc_serv *); 338int svc_create_thread(svc_thread_fn, struct svc_serv *);
339void svc_exit_thread(struct svc_rqst *); 339void svc_exit_thread(struct svc_rqst *);
340void svc_destroy(struct svc_serv *); 340void svc_destroy(struct svc_serv *);
341int svc_process(struct svc_serv *, struct svc_rqst *); 341int svc_process(struct svc_rqst *);
342int svc_register(struct svc_serv *, int, unsigned short); 342int svc_register(struct svc_serv *, int, unsigned short);
343void svc_wake_up(struct svc_serv *); 343void svc_wake_up(struct svc_serv *);
344void svc_reserve(struct svc_rqst *rqstp, int space); 344void svc_reserve(struct svc_rqst *rqstp, int space);
diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h
index b8a9652b8755..d5f15e8db929 100644
--- a/include/linux/sunrpc/svcsock.h
+++ b/include/linux/sunrpc/svcsock.h
@@ -57,7 +57,7 @@ struct svc_sock {
57 */ 57 */
58int svc_makesock(struct svc_serv *, int, unsigned short); 58int svc_makesock(struct svc_serv *, int, unsigned short);
59void svc_delete_socket(struct svc_sock *); 59void svc_delete_socket(struct svc_sock *);
60int svc_recv(struct svc_serv *, struct svc_rqst *, long); 60int svc_recv(struct svc_rqst *, long);
61int svc_send(struct svc_rqst *); 61int svc_send(struct svc_rqst *);
62void svc_drop(struct svc_rqst *); 62void svc_drop(struct svc_rqst *);
63void svc_sock_update_bufs(struct svc_serv *serv); 63void svc_sock_update_bufs(struct svc_serv *serv);
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index f5aee4c61676..eee45a58f3ee 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -253,13 +253,14 @@ svc_register(struct svc_serv *serv, int proto, unsigned short port)
253 * Process the RPC request. 253 * Process the RPC request.
254 */ 254 */
255int 255int
256svc_process(struct svc_serv *serv, struct svc_rqst *rqstp) 256svc_process(struct svc_rqst *rqstp)
257{ 257{
258 struct svc_program *progp; 258 struct svc_program *progp;
259 struct svc_version *versp = NULL; /* compiler food */ 259 struct svc_version *versp = NULL; /* compiler food */
260 struct svc_procedure *procp = NULL; 260 struct svc_procedure *procp = NULL;
261 struct kvec * argv = &rqstp->rq_arg.head[0]; 261 struct kvec * argv = &rqstp->rq_arg.head[0];
262 struct kvec * resv = &rqstp->rq_res.head[0]; 262 struct kvec * resv = &rqstp->rq_res.head[0];
263 struct svc_serv *serv = rqstp->rq_server;
263 kxdrproc_t xdr; 264 kxdrproc_t xdr;
264 __be32 *statp; 265 __be32 *statp;
265 u32 dir, prog, vers, proc; 266 u32 dir, prog, vers, proc;
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index c6be67a86ae7..bc9bd189a540 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -1166,9 +1166,10 @@ svc_sock_update_bufs(struct svc_serv *serv)
1166 * Receive the next request on any socket. 1166 * Receive the next request on any socket.
1167 */ 1167 */
1168int 1168int
1169svc_recv(struct svc_serv *serv, struct svc_rqst *rqstp, long timeout) 1169svc_recv(struct svc_rqst *rqstp, long timeout)
1170{ 1170{
1171 struct svc_sock *svsk =NULL; 1171 struct svc_sock *svsk =NULL;
1172 struct svc_serv *serv = rqstp->rq_server;
1172 int len; 1173 int len;
1173 int pages; 1174 int pages;
1174 struct xdr_buf *arg; 1175 struct xdr_buf *arg;