diff options
author | NeilBrown <neilb@suse.de> | 2006-10-02 05:17:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-02 10:57:18 -0400 |
commit | 6fb2b47fa16c81317ec282248e6cff521cca31c2 (patch) | |
tree | 226d823e900aba03fb7ee55cab3a9137fd5d9077 /fs | |
parent | 896440d560de3bca6813e83792f431edf5073318 (diff) |
[PATCH] knfsd: Drop 'serv' option to svc_recv and svc_process
It isn't needed as it is available in rqstp->rq_server, and dropping it allows
some local vars to be dropped.
[akpm@osdl.org: build fix]
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/lockd/svc.c | 7 | ||||
-rw-r--r-- | fs/nfs/callback.c | 5 | ||||
-rw-r--r-- | fs/nfsd/nfssvc.c | 6 |
3 files changed, 7 insertions, 11 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) | |||
98 | static void | 98 | static void |
99 | lockd(struct svc_rqst *rqstp) | 99 | lockd(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 | */ |
59 | static void nfs_callback_svc(struct svc_rqst *rqstp) | 59 | static 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) | |||
323 | static void | 323 | static void |
324 | nfsd(struct svc_rqst *rqstp) | 324 | nfsd(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(); |