aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/svc.c
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
commitada47b5fe13d89735805b566185f4885f5a3f750 (patch)
tree644b88f8a71896307d71438e9b3af49126ffb22b /net/sunrpc/svc.c
parent43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff)
parent3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff)
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'net/sunrpc/svc.c')
-rw-r--r--net/sunrpc/svc.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index 952f206ff307..d9017d64597e 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -19,6 +19,7 @@
19#include <linux/interrupt.h> 19#include <linux/interrupt.h>
20#include <linux/module.h> 20#include <linux/module.h>
21#include <linux/kthread.h> 21#include <linux/kthread.h>
22#include <linux/slab.h>
22 23
23#include <linux/sunrpc/types.h> 24#include <linux/sunrpc/types.h>
24#include <linux/sunrpc/xdr.h> 25#include <linux/sunrpc/xdr.h>
@@ -133,7 +134,7 @@ svc_pool_map_choose_mode(void)
133 return SVC_POOL_PERNODE; 134 return SVC_POOL_PERNODE;
134 } 135 }
135 136
136 node = any_online_node(node_online_map); 137 node = first_online_node;
137 if (nr_cpus_node(node) > 2) { 138 if (nr_cpus_node(node) > 2) {
138 /* 139 /*
139 * Non-trivial SMP, or CONFIG_NUMA on 140 * Non-trivial SMP, or CONFIG_NUMA on
@@ -506,6 +507,10 @@ svc_init_buffer(struct svc_rqst *rqstp, unsigned int size)
506{ 507{
507 unsigned int pages, arghi; 508 unsigned int pages, arghi;
508 509
510 /* bc_xprt uses fore channel allocated buffers */
511 if (svc_is_backchannel(rqstp))
512 return 1;
513
509 pages = size / PAGE_SIZE + 1; /* extra page as we hold both request and reply. 514 pages = size / PAGE_SIZE + 1; /* extra page as we hold both request and reply.
510 * We assume one is at most one page 515 * We assume one is at most one page
511 */ 516 */
@@ -1103,8 +1108,9 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv)
1103 procp->pc_release(rqstp, NULL, rqstp->rq_resp); 1108 procp->pc_release(rqstp, NULL, rqstp->rq_resp);
1104 goto dropit; 1109 goto dropit;
1105 } 1110 }
1106 if (*statp == rpc_success && (xdr = procp->pc_encode) 1111 if (*statp == rpc_success &&
1107 && !xdr(rqstp, resv->iov_base+resv->iov_len, rqstp->rq_resp)) { 1112 (xdr = procp->pc_encode) &&
1113 !xdr(rqstp, resv->iov_base+resv->iov_len, rqstp->rq_resp)) {
1108 dprintk("svc: failed to encode reply\n"); 1114 dprintk("svc: failed to encode reply\n");
1109 /* serv->sv_stats->rpcsystemerr++; */ 1115 /* serv->sv_stats->rpcsystemerr++; */
1110 *statp = rpc_system_err; 1116 *statp = rpc_system_err;