--- /dev/null
+diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c
+index 285dc08..ab74500 100644
+--- a/net/sunrpc/xprtrdma/transport.c
++++ b/net/sunrpc/xprtrdma/transport.c
+@@ -279,7 +281,9 @@ xprt_setup_rdma(struct xprt_create *args)
+ }
+
+ 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",
+@@ -448,8 +452,15 @@ xprt_rdma_connect(struct rpc_xprt *xprt, struct rpc_task *task)
+ }
+
+ 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)
++#endif
+ {
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
++ 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);
+
+@@ -461,7 +472,11 @@ xprt_rdma_reserve_xprt(struct rpc_xprt *xprt, struct rpc_task *task)
+ 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
+ }
+
+ /*