aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/svc.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 14:38:13 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 14:38:13 -0500
commitcb18eccff48ef3986d1072964590bce6fec705fb (patch)
tree777fb1d15e0281341e1e02c9803d989538d346f2 /net/sunrpc/svc.c
parentc827ba4cb49a30ce581201fd0ba2be77cde412c7 (diff)
parent5ef213f6842277ee1df5659f59fac0ffc9beb411 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (45 commits) [IPV4]: Restore multipath routing after rt_next changes. [XFRM] IPV6: Fix outbound RO transformation which is broken by IPsec tunnel patch. [NET]: Reorder fields of struct dst_entry [DECNET]: Convert decnet route to use the new dst_entry 'next' pointer [IPV6]: Convert ipv6 route to use the new dst_entry 'next' pointer [IPV4]: Convert ipv4 route to use the new dst_entry 'next' pointer [NET]: Introduce union in struct dst_entry to hold 'next' pointer [DECNET]: fix misannotation of linkinfo_dn [DECNET]: FRA_{DST,SRC} are le16 for decnet [UDP]: UDP can use sk_hash to speedup lookups [NET]: Fix whitespace errors. [NET] XFRM: Fix whitespace errors. [NET] X25: Fix whitespace errors. [NET] WANROUTER: Fix whitespace errors. [NET] UNIX: Fix whitespace errors. [NET] TIPC: Fix whitespace errors. [NET] SUNRPC: Fix whitespace errors. [NET] SCTP: Fix whitespace errors. [NET] SCHED: Fix whitespace errors. [NET] RXRPC: Fix whitespace errors. ...
Diffstat (limited to 'net/sunrpc/svc.c')
-rw-r--r--net/sunrpc/svc.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index c1f878131ac6..b00511d39b65 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -397,7 +397,7 @@ svc_destroy(struct svc_serv *serv)
397 sk_list); 397 sk_list);
398 svc_close_socket(svsk); 398 svc_close_socket(svsk);
399 } 399 }
400 400
401 cache_clean_deferred(serv); 401 cache_clean_deferred(serv);
402 402
403 /* Unregister service with the portmapper */ 403 /* Unregister service with the portmapper */
@@ -415,7 +415,7 @@ svc_init_buffer(struct svc_rqst *rqstp, unsigned int size)
415{ 415{
416 int pages; 416 int pages;
417 int arghi; 417 int arghi;
418 418
419 pages = size / PAGE_SIZE + 1; /* extra page as we hold both request and reply. 419 pages = size / PAGE_SIZE + 1; /* extra page as we hold both request and reply.
420 * We assume one is at most one page 420 * We assume one is at most one page
421 */ 421 */
@@ -514,7 +514,7 @@ choose_pool(struct svc_serv *serv, struct svc_pool *pool, unsigned int *state)
514 if (pool != NULL) 514 if (pool != NULL)
515 return pool; 515 return pool;
516 516
517 return &serv->sv_pools[(*state)++ % serv->sv_nrpools]; 517 return &serv->sv_pools[(*state)++ % serv->sv_nrpools];
518} 518}
519 519
520/* 520/*
@@ -530,13 +530,13 @@ choose_victim(struct svc_serv *serv, struct svc_pool *pool, unsigned int *state)
530 spin_lock_bh(&pool->sp_lock); 530 spin_lock_bh(&pool->sp_lock);
531 } else { 531 } else {
532 /* choose a pool in round-robin fashion */ 532 /* choose a pool in round-robin fashion */
533 for (i = 0; i < serv->sv_nrpools; i++) { 533 for (i = 0; i < serv->sv_nrpools; i++) {
534 pool = &serv->sv_pools[--(*state) % serv->sv_nrpools]; 534 pool = &serv->sv_pools[--(*state) % serv->sv_nrpools];
535 spin_lock_bh(&pool->sp_lock); 535 spin_lock_bh(&pool->sp_lock);
536 if (!list_empty(&pool->sp_all_threads)) 536 if (!list_empty(&pool->sp_all_threads))
537 goto found_pool; 537 goto found_pool;
538 spin_unlock_bh(&pool->sp_lock); 538 spin_unlock_bh(&pool->sp_lock);
539 } 539 }
540 return NULL; 540 return NULL;
541 } 541 }
542 542
@@ -551,7 +551,7 @@ found_pool:
551 rqstp = list_entry(pool->sp_all_threads.next, struct svc_rqst, rq_all); 551 rqstp = list_entry(pool->sp_all_threads.next, struct svc_rqst, rq_all);
552 list_del_init(&rqstp->rq_all); 552 list_del_init(&rqstp->rq_all);
553 task = rqstp->rq_task; 553 task = rqstp->rq_task;
554 } 554 }
555 spin_unlock_bh(&pool->sp_lock); 555 spin_unlock_bh(&pool->sp_lock);
556 556
557 return task; 557 return task;
@@ -636,7 +636,7 @@ svc_exit_thread(struct svc_rqst *rqstp)
636 636
637/* 637/*
638 * Register an RPC service with the local portmapper. 638 * Register an RPC service with the local portmapper.
639 * To unregister a service, call this routine with 639 * To unregister a service, call this routine with
640 * proto and port == 0. 640 * proto and port == 0.
641 */ 641 */
642int 642int
@@ -709,7 +709,7 @@ svc_process(struct svc_rqst *rqstp)
709 goto err_short_len; 709 goto err_short_len;
710 710
711 /* setup response xdr_buf. 711 /* setup response xdr_buf.
712 * Initially it has just one page 712 * Initially it has just one page
713 */ 713 */
714 rqstp->rq_resused = 1; 714 rqstp->rq_resused = 1;
715 resv->iov_base = page_address(rqstp->rq_respages[0]); 715 resv->iov_base = page_address(rqstp->rq_respages[0]);
@@ -811,7 +811,7 @@ svc_process(struct svc_rqst *rqstp)
811 memset(rqstp->rq_argp, 0, procp->pc_argsize); 811 memset(rqstp->rq_argp, 0, procp->pc_argsize);
812 memset(rqstp->rq_resp, 0, procp->pc_ressize); 812 memset(rqstp->rq_resp, 0, procp->pc_ressize);
813 813
814 /* un-reserve some of the out-queue now that we have a 814 /* un-reserve some of the out-queue now that we have a
815 * better idea of reply size 815 * better idea of reply size
816 */ 816 */
817 if (procp->pc_xdrressize) 817 if (procp->pc_xdrressize)