diff options
Diffstat (limited to 'net/sunrpc/svc.c')
-rw-r--r-- | net/sunrpc/svc.c | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index 090af78d68b5..d74c2d269539 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c | |||
@@ -510,8 +510,7 @@ EXPORT_SYMBOL(svc_destroy); | |||
510 | static int | 510 | static int |
511 | svc_init_buffer(struct svc_rqst *rqstp, unsigned int size) | 511 | svc_init_buffer(struct svc_rqst *rqstp, unsigned int size) |
512 | { | 512 | { |
513 | int pages; | 513 | unsigned int pages, arghi; |
514 | int arghi; | ||
515 | 514 | ||
516 | pages = size / PAGE_SIZE + 1; /* extra page as we hold both request and reply. | 515 | pages = size / PAGE_SIZE + 1; /* extra page as we hold both request and reply. |
517 | * We assume one is at most one page | 516 | * We assume one is at most one page |
@@ -525,7 +524,7 @@ svc_init_buffer(struct svc_rqst *rqstp, unsigned int size) | |||
525 | rqstp->rq_pages[arghi++] = p; | 524 | rqstp->rq_pages[arghi++] = p; |
526 | pages--; | 525 | pages--; |
527 | } | 526 | } |
528 | return ! pages; | 527 | return pages == 0; |
529 | } | 528 | } |
530 | 529 | ||
531 | /* | 530 | /* |
@@ -534,8 +533,9 @@ svc_init_buffer(struct svc_rqst *rqstp, unsigned int size) | |||
534 | static void | 533 | static void |
535 | svc_release_buffer(struct svc_rqst *rqstp) | 534 | svc_release_buffer(struct svc_rqst *rqstp) |
536 | { | 535 | { |
537 | int i; | 536 | unsigned int i; |
538 | for (i=0; i<ARRAY_SIZE(rqstp->rq_pages); i++) | 537 | |
538 | for (i = 0; i < ARRAY_SIZE(rqstp->rq_pages); i++) | ||
539 | if (rqstp->rq_pages[i]) | 539 | if (rqstp->rq_pages[i]) |
540 | put_page(rqstp->rq_pages[i]); | 540 | put_page(rqstp->rq_pages[i]); |
541 | } | 541 | } |
@@ -590,7 +590,7 @@ __svc_create_thread(svc_thread_fn func, struct svc_serv *serv, | |||
590 | struct svc_rqst *rqstp; | 590 | struct svc_rqst *rqstp; |
591 | int error = -ENOMEM; | 591 | int error = -ENOMEM; |
592 | int have_oldmask = 0; | 592 | int have_oldmask = 0; |
593 | cpumask_t oldmask; | 593 | cpumask_t uninitialized_var(oldmask); |
594 | 594 | ||
595 | rqstp = svc_prepare_thread(serv, pool); | 595 | rqstp = svc_prepare_thread(serv, pool); |
596 | if (IS_ERR(rqstp)) { | 596 | if (IS_ERR(rqstp)) { |
@@ -619,16 +619,6 @@ out_thread: | |||
619 | } | 619 | } |
620 | 620 | ||
621 | /* | 621 | /* |
622 | * Create a thread in the default pool. Caller must hold BKL. | ||
623 | */ | ||
624 | int | ||
625 | svc_create_thread(svc_thread_fn func, struct svc_serv *serv) | ||
626 | { | ||
627 | return __svc_create_thread(func, serv, &serv->sv_pools[0]); | ||
628 | } | ||
629 | EXPORT_SYMBOL(svc_create_thread); | ||
630 | |||
631 | /* | ||
632 | * Choose a pool in which to create a new thread, for svc_set_num_threads | 622 | * Choose a pool in which to create a new thread, for svc_set_num_threads |
633 | */ | 623 | */ |
634 | static inline struct svc_pool * | 624 | static inline struct svc_pool * |
@@ -921,8 +911,7 @@ svc_process(struct svc_rqst *rqstp) | |||
921 | case SVC_OK: | 911 | case SVC_OK: |
922 | break; | 912 | break; |
923 | case SVC_GARBAGE: | 913 | case SVC_GARBAGE: |
924 | rpc_stat = rpc_garbage_args; | 914 | goto err_garbage; |
925 | goto err_bad; | ||
926 | case SVC_SYSERR: | 915 | case SVC_SYSERR: |
927 | rpc_stat = rpc_system_err; | 916 | rpc_stat = rpc_system_err; |
928 | goto err_bad; | 917 | goto err_bad; |