--- /dev/null
+--- a/net/sunrpc/xprtrdma/svc_rdma_transport.c 2012-08-10 14:24:49.030166769 -0700
++++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c 2012-08-13 11:07:38.566980365 -0700
+@@ -445,7 +445,11 @@
+
+ if (!cma_xprt)
+ return NULL;
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
+ svc_xprt_init(&init_net, &svc_rdma_class, &cma_xprt->sc_xprt, serv);
++#else
++ svc_xprt_init(&svc_rdma_class, &cma_xprt->sc_xprt, serv);
++#endif
+ INIT_LIST_HEAD(&cma_xprt->sc_accept_q);
+ INIT_LIST_HEAD(&cma_xprt->sc_dto_q);
+ INIT_LIST_HEAD(&cma_xprt->sc_rq_dto_q);
+
+--- a/net/sunrpc/xprtrdma/transport.c 2012-08-10 14:24:49.030166769 -0700
++++ b/net/sunrpc/xprtrdma/transport.c 2012-08-15 10:30:17.125653683 -0700
+@@ -283,7 +283,9 @@
+ }
+
+ xprt = xprt_alloc(args->net, sizeof(struct rpcrdma_xprt),
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
+ xprt_rdma_slot_table_entries,
++#endif
+ xprt_rdma_slot_table_entries);
+ if (xprt == NULL) {
+ dprintk("RPC: %s: couldn't allocate rpcrdma_xprt\n",
+@@ -453,8 +455,14 @@
+ }
+
+ static int
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
+ xprt_rdma_reserve_xprt(struct rpc_xprt *xprt, struct rpc_task *task)
+ {
++#else
++xprt_rdma_reserve_xprt(struct rpc_task *task)
++{
++ struct rpc_xprt *xprt = task->tk_xprt;
++#endif
+ struct rpcrdma_xprt *r_xprt = rpcx_to_rdmax(xprt);
+ int credits = atomic_read(&r_xprt->rx_buf.rb_credits);
+
+@@ -466,7 +474,11 @@
+ BUG_ON(r_xprt->rx_buf.rb_cwndscale <= 0);
+ }
+ xprt->cwnd = credits * r_xprt->rx_buf.rb_cwndscale;
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
+ return xprt_reserve_xprt_cong(xprt, task);
++#else
++ return xprt_reserve_xprt_cong(task);
++#endif
+ }
+
+ /*