>From 510efe6af21226125d139008226014ce1673d9a2 Mon Sep 17 00:00:00 2001
From: Jeff Becker <Jeffrey.C.Becker@nasa.gov>
Date: Thu, 3 Nov 2011 10:14:26 -0700
Subject: [PATCH] NFSRDMA: patches for 2.6.34
 Signed-off-by: Jeff Becker <Jeffrey.C.Becker@nasa.gov>

---
 ...ve-duplicate-universal-address-generation.patch |   42 +++++
 ...rpc_ntop-for-constructing-transport-addre.patch |   74 +++++++++
 .../nfsrdma-0003-SUNRPC-Kill-RPC_DISPLAY_ALL.patch |   28 +++
 ...sctl-net-Remove-unused-binary-sysctl-code.patch |  168 +++++++++++++++++++
 ...ysctl-Drop-in-front-of-every-proc_handler.patch |  174 ++++++++++++++++++++
 ...a-headers-remove-sched.h-from-interrupt.h.patch |   23 +++
 ...dma-sunrpc-Clean-never-used-include-files.patch |   32 ++++
 ...move-struct-file-argument-of-proc_handler.patch |   37 ++++
 8 files changed, 578 insertions(+), 0 deletions(-)
 create mode 100644 kernel_patches/backport/2.6.34/nfsrdma-0001-SUNRPC-Remove-duplicate-universal-address-generation.patch
 create mode 100644 kernel_patches/backport/2.6.34/nfsrdma-0002-SUNRPC-Use-rpc_ntop-for-constructing-transport-addre.patch
 create mode 100644 kernel_patches/backport/2.6.34/nfsrdma-0003-SUNRPC-Kill-RPC_DISPLAY_ALL.patch
 create mode 100644 kernel_patches/backport/2.6.34/nfsrdma-0004-sysctl-net-Remove-unused-binary-sysctl-code.patch
 create mode 100644 kernel_patches/backport/2.6.34/nfsrdma-0005-sysctl-Drop-in-front-of-every-proc_handler.patch
 create mode 100644 kernel_patches/backport/2.6.34/nfsrdma-headers-remove-sched.h-from-interrupt.h.patch
 create mode 100644 kernel_patches/backport/2.6.34/nfsrdma-sunrpc-Clean-never-used-include-files.patch
 create mode 100644 kernel_patches/backport/2.6.34/nfsrdma-sysctl-remove-struct-file-argument-of-proc_handler.patch

diff --git a/kernel_patches/backport/2.6.34/nfsrdma-0001-SUNRPC-Remove-duplicate-universal-address-generation.patch b/kernel_patches/backport/2.6.34/nfsrdma-0001-SUNRPC-Remove-duplicate-universal-address-generation.patch
new file mode 100644
index 0000000..de9c3a8
--- /dev/null
+++ b/kernel_patches/backport/2.6.34/nfsrdma-0001-SUNRPC-Remove-duplicate-universal-address-generation.patch
@@ -0,0 +1,42 @@
+From ba809130bc260fce04141aca01ef9e068d32af2a Mon Sep 17 00:00:00 2001
+From: Chuck Lever <chuck.lever@oracle.com>
+Date: Sun, 9 Aug 2009 15:09:35 -0400
+Subject: [PATCH] SUNRPC: Remove duplicate universal address generation
+
+RPC universal address generation is currently done in several places:
+rpcb_clnt.c, nfs4proc.c xprtsock.c, and xprtrdma.c.  Remove the
+redundant cases that convert a socket address to a universal
+address.  The nfs4proc.c case takes a pre-formatted presentation
+address string, not a socket address, so we'll leave that one.
+
+Because the new uaddr constructor uses the recently introduced
+rpc_ntop(), it now supports proper "::" shorthanding for IPv6
+addresses.  This allows the kernel to register properly formed
+universal addresses with the local rpcbind service, in _all_ cases.
+
+The kernel can now also send properly formed universal addresses in
+RPCB_GETADDR requests, and support link-local properly when
+encoding and decoding IPv6 addresses.
+
+Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
+Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
+---
+diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c
+index 1dd6123..537c210 100644
+--- a/net/sunrpc/xprtrdma/transport.c
++++ b/net/sunrpc/xprtrdma/transport.c
+@@ -202,14 +202,6 @@ xprt_rdma_format_addresses(struct rpc_xprt *xprt)
+ 		snprintf(buf, 8, "%4hx", ntohs(addr->sin_port));
+ 	xprt->address_strings[RPC_DISPLAY_HEX_PORT] = buf;
+ 
+-	buf = kzalloc(30, GFP_KERNEL);
+-	if (buf)
+-		snprintf(buf, 30, "%pI4.%u.%u",
+-			&addr->sin_addr.s_addr,
+-			ntohs(addr->sin_port) >> 8,
+-			ntohs(addr->sin_port) & 0xff);
+-	xprt->address_strings[RPC_DISPLAY_UNIVERSAL_ADDR] = buf;
+-
+ 	/* netid */
+ 	xprt->address_strings[RPC_DISPLAY_NETID] = "rdma";
+ }
diff --git a/kernel_patches/backport/2.6.34/nfsrdma-0002-SUNRPC-Use-rpc_ntop-for-constructing-transport-addre.patch b/kernel_patches/backport/2.6.34/nfsrdma-0002-SUNRPC-Use-rpc_ntop-for-constructing-transport-addre.patch
new file mode 100644
index 0000000..67d3f7b
--- /dev/null
+++ b/kernel_patches/backport/2.6.34/nfsrdma-0002-SUNRPC-Use-rpc_ntop-for-constructing-transport-addre.patch
@@ -0,0 +1,74 @@
+From c877b849d302d1275452af80b7221a2555dc02e1 Mon Sep 17 00:00:00 2001
+From: Chuck Lever <chuck.lever@oracle.com>
+Date: Sun, 9 Aug 2009 15:09:36 -0400
+Subject: [PATCH] SUNRPC: Use rpc_ntop() for constructing transport address strings
+
+Clean up:  In addition to using the new generic rpc_ntop() and
+rpc_get_port() functions, have the RPC client compute the presentation
+address buffer sizes dynamically using kstrdup().
+
+Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
+Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
+---
+diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c
+index 537c210..5f9b867 100644
+--- a/net/sunrpc/xprtrdma/transport.c
++++ b/net/sunrpc/xprtrdma/transport.c
+@@ -168,39 +168,30 @@ static struct rpc_xprt_ops xprt_rdma_procs;	/* forward reference */
+ static void
+ xprt_rdma_format_addresses(struct rpc_xprt *xprt)
+ {
+-	struct sockaddr_in *addr = (struct sockaddr_in *)
++	struct sockaddr *sap = (struct sockaddr *)
+ 					&rpcx_to_rdmad(xprt).addr;
+-	char *buf;
++	struct sockaddr_in *sin = (struct sockaddr_in *)sap;
++	char buf[64];
+ 
+-	buf = kzalloc(20, GFP_KERNEL);
+-	if (buf)
+-		snprintf(buf, 20, "%pI4", &addr->sin_addr.s_addr);
+-	xprt->address_strings[RPC_DISPLAY_ADDR] = buf;
++	(void)rpc_ntop(sap, buf, sizeof(buf));
++	xprt->address_strings[RPC_DISPLAY_ADDR] = kstrdup(buf, GFP_KERNEL);
+ 
+-	buf = kzalloc(8, GFP_KERNEL);
+-	if (buf)
+-		snprintf(buf, 8, "%u", ntohs(addr->sin_port));
+-	xprt->address_strings[RPC_DISPLAY_PORT] = buf;
++	(void)snprintf(buf, sizeof(buf), "%u", rpc_get_port(sap));
++	xprt->address_strings[RPC_DISPLAY_PORT] = kstrdup(buf, GFP_KERNEL);
+ 
+ 	xprt->address_strings[RPC_DISPLAY_PROTO] = "rdma";
+ 
+-	buf = kzalloc(48, GFP_KERNEL);
+-	if (buf)
+-		snprintf(buf, 48, "addr=%pI4 port=%u proto=%s",
+-			&addr->sin_addr.s_addr,
+-			ntohs(addr->sin_port), "rdma");
+-	xprt->address_strings[RPC_DISPLAY_ALL] = buf;
+-
+-	buf = kzalloc(10, GFP_KERNEL);
+-	if (buf)
+-		snprintf(buf, 10, "%02x%02x%02x%02x",
+-			NIPQUAD(addr->sin_addr.s_addr));
+-	xprt->address_strings[RPC_DISPLAY_HEX_ADDR] = buf;
+-
+-	buf = kzalloc(8, GFP_KERNEL);
+-	if (buf)
+-		snprintf(buf, 8, "%4hx", ntohs(addr->sin_port));
+-	xprt->address_strings[RPC_DISPLAY_HEX_PORT] = buf;
++	(void)snprintf(buf, sizeof(buf), "addr=%s port=%s proto=rdma",
++			xprt->address_strings[RPC_DISPLAY_ADDR],
++			xprt->address_strings[RPC_DISPLAY_PORT]);
++	xprt->address_strings[RPC_DISPLAY_ALL] = kstrdup(buf, GFP_KERNEL);
++
++	(void)snprintf(buf, sizeof(buf), "%02x%02x%02x%02x",
++				NIPQUAD(sin->sin_addr.s_addr));
++	xprt->address_strings[RPC_DISPLAY_HEX_ADDR] = kstrdup(buf, GFP_KERNEL);
++
++	(void)snprintf(buf, sizeof(buf), "%4hx", rpc_get_port(sap));
++	xprt->address_strings[RPC_DISPLAY_HEX_PORT] = kstrdup(buf, GFP_KERNEL);
+ 
+ 	/* netid */
+ 	xprt->address_strings[RPC_DISPLAY_NETID] = "rdma";
diff --git a/kernel_patches/backport/2.6.34/nfsrdma-0003-SUNRPC-Kill-RPC_DISPLAY_ALL.patch b/kernel_patches/backport/2.6.34/nfsrdma-0003-SUNRPC-Kill-RPC_DISPLAY_ALL.patch
new file mode 100644
index 0000000..7711a04
--- /dev/null
+++ b/kernel_patches/backport/2.6.34/nfsrdma-0003-SUNRPC-Kill-RPC_DISPLAY_ALL.patch
@@ -0,0 +1,28 @@
+From c740eff84bcfd63c0497ef880e80171931cb8222 Mon Sep 17 00:00:00 2001
+From: Chuck Lever <chuck.lever@oracle.com>
+Date: Sun, 9 Aug 2009 15:09:46 -0400
+Subject: [PATCH] SUNRPC: Kill RPC_DISPLAY_ALL
+
+At some point, I recall that rpc_pipe_fs used RPC_DISPLAY_ALL.
+Currently there are no uses of RPC_DISPLAY_ALL outside the transport
+modules themselves, so we can safely get rid of it.
+
+Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
+Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
+---
+diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c
+index 5f9b867..9a63f66 100644
+--- a/net/sunrpc/xprtrdma/transport.c
++++ b/net/sunrpc/xprtrdma/transport.c
+@@ -181,11 +181,6 @@ xprt_rdma_format_addresses(struct rpc_xprt *xprt)
+ 
+ 	xprt->address_strings[RPC_DISPLAY_PROTO] = "rdma";
+ 
+-	(void)snprintf(buf, sizeof(buf), "addr=%s port=%s proto=rdma",
+-			xprt->address_strings[RPC_DISPLAY_ADDR],
+-			xprt->address_strings[RPC_DISPLAY_PORT]);
+-	xprt->address_strings[RPC_DISPLAY_ALL] = kstrdup(buf, GFP_KERNEL);
+-
+ 	(void)snprintf(buf, sizeof(buf), "%02x%02x%02x%02x",
+ 				NIPQUAD(sin->sin_addr.s_addr));
+ 	xprt->address_strings[RPC_DISPLAY_HEX_ADDR] = kstrdup(buf, GFP_KERNEL);
diff --git a/kernel_patches/backport/2.6.34/nfsrdma-0004-sysctl-net-Remove-unused-binary-sysctl-code.patch b/kernel_patches/backport/2.6.34/nfsrdma-0004-sysctl-net-Remove-unused-binary-sysctl-code.patch
new file mode 100644
index 0000000..ccee16c
--- /dev/null
+++ b/kernel_patches/backport/2.6.34/nfsrdma-0004-sysctl-net-Remove-unused-binary-sysctl-code.patch
@@ -0,0 +1,168 @@
+From f8572d8f2a2ba75408b97dc24ef47c83671795d7 Mon Sep 17 00:00:00 2001
+From: Eric W. Biederman <ebiederm@xmission.com>
+Date: Thu, 5 Nov 2009 13:32:03 -0800
+Subject: [PATCH] sysctl net: Remove unused binary sysctl code
+
+Now that sys_sysctl is a compatiblity wrapper around /proc/sys
+all sysctl strategy routines, and all ctl_name and strategy
+entries in the sysctl tables are unused, and can be
+revmoed.
+
+In addition neigh_sysctl_register has been modified to no longer
+take a strategy argument and it's callers have been modified not
+to pass one.
+
+Cc: "David Miller" <davem@davemloft.net>
+Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
+Cc: netdev@vger.kernel.org
+Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
+---
+diff --git a/net/sunrpc/xprtrdma/svc_rdma.c b/net/sunrpc/xprtrdma/svc_rdma.c
+index 35fb68b..678cee2 100644
+--- a/net/sunrpc/xprtrdma/svc_rdma.c
++++ b/net/sunrpc/xprtrdma/svc_rdma.c
+@@ -121,7 +121,6 @@ static ctl_table svcrdma_parm_table[] = {
+ 		.maxlen		= sizeof(unsigned int),
+ 		.mode		= 0644,
+ 		.proc_handler	= &proc_dointvec_minmax,
+-		.strategy	= &sysctl_intvec,
+ 		.extra1		= &min_max_requests,
+ 		.extra2		= &max_max_requests
+ 	},
+@@ -131,7 +130,6 @@ static ctl_table svcrdma_parm_table[] = {
+ 		.maxlen		= sizeof(unsigned int),
+ 		.mode		= 0644,
+ 		.proc_handler	= &proc_dointvec_minmax,
+-		.strategy	= &sysctl_intvec,
+ 		.extra1		= &min_max_inline,
+ 		.extra2		= &max_max_inline
+ 	},
+@@ -141,7 +139,6 @@ static ctl_table svcrdma_parm_table[] = {
+ 		.maxlen		= sizeof(unsigned int),
+ 		.mode		= 0644,
+ 		.proc_handler	= &proc_dointvec_minmax,
+-		.strategy	= &sysctl_intvec,
+ 		.extra1		= &min_ord,
+ 		.extra2		= &max_ord,
+ 	},
+@@ -209,9 +206,7 @@ static ctl_table svcrdma_parm_table[] = {
+ 		.mode		= 0644,
+ 		.proc_handler	= &read_reset_stat,
+ 	},
+-	{
+-		.ctl_name = 0,
+-	},
++	{ },
+ };
+ 
+ static ctl_table svcrdma_table[] = {
+@@ -220,21 +215,16 @@ static ctl_table svcrdma_table[] = {
+ 		.mode		= 0555,
+ 		.child		= svcrdma_parm_table
+ 	},
+-	{
+-		.ctl_name = 0,
+-	},
++	{ },
+ };
+ 
+ static ctl_table svcrdma_root_table[] = {
+ 	{
+-		.ctl_name	= CTL_SUNRPC,
+ 		.procname	= "sunrpc",
+ 		.mode		= 0555,
+ 		.child		= svcrdma_table
+ 	},
+-	{
+-		.ctl_name = 0,
+-	},
++	{ },
+ };
+ 
+ void svc_rdma_cleanup(void)
+diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c
+index 9a63f66..4768160 100644
+--- a/net/sunrpc/xprtrdma/transport.c
++++ b/net/sunrpc/xprtrdma/transport.c
+@@ -86,79 +86,63 @@ static struct ctl_table_header *sunrpc_table_header;
+ 
+ static ctl_table xr_tunables_table[] = {
+ 	{
+-		.ctl_name       = CTL_UNNUMBERED,
+ 		.procname	= "rdma_slot_table_entries",
+ 		.data		= &xprt_rdma_slot_table_entries,
+ 		.maxlen		= sizeof(unsigned int),
+ 		.mode		= 0644,
+ 		.proc_handler	= &proc_dointvec_minmax,
+-		.strategy	= &sysctl_intvec,
+ 		.extra1		= &min_slot_table_size,
+ 		.extra2		= &max_slot_table_size
+ 	},
+ 	{
+-		.ctl_name       = CTL_UNNUMBERED,
+ 		.procname	= "rdma_max_inline_read",
+ 		.data		= &xprt_rdma_max_inline_read,
+ 		.maxlen		= sizeof(unsigned int),
+ 		.mode		= 0644,
+ 		.proc_handler	= &proc_dointvec,
+-		.strategy	= &sysctl_intvec,
+ 	},
+ 	{
+-		.ctl_name       = CTL_UNNUMBERED,
+ 		.procname	= "rdma_max_inline_write",
+ 		.data		= &xprt_rdma_max_inline_write,
+ 		.maxlen		= sizeof(unsigned int),
+ 		.mode		= 0644,
+ 		.proc_handler	= &proc_dointvec,
+-		.strategy	= &sysctl_intvec,
+ 	},
+ 	{
+-		.ctl_name       = CTL_UNNUMBERED,
+ 		.procname	= "rdma_inline_write_padding",
+ 		.data		= &xprt_rdma_inline_write_padding,
+ 		.maxlen		= sizeof(unsigned int),
+ 		.mode		= 0644,
+ 		.proc_handler	= &proc_dointvec_minmax,
+-		.strategy	= &sysctl_intvec,
+ 		.extra1		= &zero,
+ 		.extra2		= &max_padding,
+ 	},
+ 	{
+-		.ctl_name       = CTL_UNNUMBERED,
+ 		.procname	= "rdma_memreg_strategy",
+ 		.data		= &xprt_rdma_memreg_strategy,
+ 		.maxlen		= sizeof(unsigned int),
+ 		.mode		= 0644,
+ 		.proc_handler	= &proc_dointvec_minmax,
+-		.strategy	= &sysctl_intvec,
+ 		.extra1		= &min_memreg,
+ 		.extra2		= &max_memreg,
+ 	},
+ 	{
+-		.ctl_name       = CTL_UNNUMBERED,
+ 		.procname	= "rdma_pad_optimize",
+ 		.data		= &xprt_rdma_pad_optimize,
+ 		.maxlen		= sizeof(unsigned int),
+ 		.mode		= 0644,
+ 		.proc_handler	= &proc_dointvec,
+ 	},
+-	{
+-		.ctl_name = 0,
+-	},
++	{ },
+ };
+ 
+ static ctl_table sunrpc_table[] = {
+ 	{
+-		.ctl_name	= CTL_SUNRPC,
+ 		.procname	= "sunrpc",
+ 		.mode		= 0555,
+ 		.child		= xr_tunables_table
+ 	},
+-	{
+-		.ctl_name = 0,
+-	},
++	{ },
+ };
+ 
+ #endif
diff --git a/kernel_patches/backport/2.6.34/nfsrdma-0005-sysctl-Drop-in-front-of-every-proc_handler.patch b/kernel_patches/backport/2.6.34/nfsrdma-0005-sysctl-Drop-in-front-of-every-proc_handler.patch
new file mode 100644
index 0000000..3bb4587
--- /dev/null
+++ b/kernel_patches/backport/2.6.34/nfsrdma-0005-sysctl-Drop-in-front-of-every-proc_handler.patch
@@ -0,0 +1,174 @@
+From 6d4561110a3e9fa742aeec6717248a491dfb1878 Mon Sep 17 00:00:00 2001
+From: Eric W. Biederman <ebiederm@xmission.com>
+Date: Mon, 16 Nov 2009 03:11:48 -0800
+Subject: [PATCH] sysctl: Drop & in front of every proc_handler.
+
+For consistency drop & in front of every proc_handler.  Explicity
+taking the address is unnecessary and it prevents optimizations
+like stubbing the proc_handlers to NULL.
+
+Cc: Alexey Dobriyan <adobriyan@gmail.com>
+Cc: Ingo Molnar <mingo@elte.hu>
+Cc: Joe Perches <joe@perches.com>
+Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
+---
+diff --git a/net/sunrpc/xprtrdma/svc_rdma.c b/net/sunrpc/xprtrdma/svc_rdma.c
+index 678cee2..5b8a8ff 100644
+--- a/net/sunrpc/xprtrdma/svc_rdma.c
++++ b/net/sunrpc/xprtrdma/svc_rdma.c
+@@ -120,7 +120,7 @@ static ctl_table svcrdma_parm_table[] = {
+ 		.data		= &svcrdma_max_requests,
+ 		.maxlen		= sizeof(unsigned int),
+ 		.mode		= 0644,
+-		.proc_handler	= &proc_dointvec_minmax,
++		.proc_handler	= proc_dointvec_minmax,
+ 		.extra1		= &min_max_requests,
+ 		.extra2		= &max_max_requests
+ 	},
+@@ -129,7 +129,7 @@ static ctl_table svcrdma_parm_table[] = {
+ 		.data		= &svcrdma_max_req_size,
+ 		.maxlen		= sizeof(unsigned int),
+ 		.mode		= 0644,
+-		.proc_handler	= &proc_dointvec_minmax,
++		.proc_handler	= proc_dointvec_minmax,
+ 		.extra1		= &min_max_inline,
+ 		.extra2		= &max_max_inline
+ 	},
+@@ -138,7 +138,7 @@ static ctl_table svcrdma_parm_table[] = {
+ 		.data		= &svcrdma_ord,
+ 		.maxlen		= sizeof(unsigned int),
+ 		.mode		= 0644,
+-		.proc_handler	= &proc_dointvec_minmax,
++		.proc_handler	= proc_dointvec_minmax,
+ 		.extra1		= &min_ord,
+ 		.extra2		= &max_ord,
+ 	},
+@@ -148,63 +148,63 @@ static ctl_table svcrdma_parm_table[] = {
+ 		.data		= &rdma_stat_read,
+ 		.maxlen		= sizeof(atomic_t),
+ 		.mode		= 0644,
+-		.proc_handler	= &read_reset_stat,
++		.proc_handler	= read_reset_stat,
+ 	},
+ 	{
+ 		.procname	= "rdma_stat_recv",
+ 		.data		= &rdma_stat_recv,
+ 		.maxlen		= sizeof(atomic_t),
+ 		.mode		= 0644,
+-		.proc_handler	= &read_reset_stat,
++		.proc_handler	= read_reset_stat,
+ 	},
+ 	{
+ 		.procname	= "rdma_stat_write",
+ 		.data		= &rdma_stat_write,
+ 		.maxlen		= sizeof(atomic_t),
+ 		.mode		= 0644,
+-		.proc_handler	= &read_reset_stat,
++		.proc_handler	= read_reset_stat,
+ 	},
+ 	{
+ 		.procname	= "rdma_stat_sq_starve",
+ 		.data		= &rdma_stat_sq_starve,
+ 		.maxlen		= sizeof(atomic_t),
+ 		.mode		= 0644,
+-		.proc_handler	= &read_reset_stat,
++		.proc_handler	= read_reset_stat,
+ 	},
+ 	{
+ 		.procname	= "rdma_stat_rq_starve",
+ 		.data		= &rdma_stat_rq_starve,
+ 		.maxlen		= sizeof(atomic_t),
+ 		.mode		= 0644,
+-		.proc_handler	= &read_reset_stat,
++		.proc_handler	= read_reset_stat,
+ 	},
+ 	{
+ 		.procname	= "rdma_stat_rq_poll",
+ 		.data		= &rdma_stat_rq_poll,
+ 		.maxlen		= sizeof(atomic_t),
+ 		.mode		= 0644,
+-		.proc_handler	= &read_reset_stat,
++		.proc_handler	= read_reset_stat,
+ 	},
+ 	{
+ 		.procname	= "rdma_stat_rq_prod",
+ 		.data		= &rdma_stat_rq_prod,
+ 		.maxlen		= sizeof(atomic_t),
+ 		.mode		= 0644,
+-		.proc_handler	= &read_reset_stat,
++		.proc_handler	= read_reset_stat,
+ 	},
+ 	{
+ 		.procname	= "rdma_stat_sq_poll",
+ 		.data		= &rdma_stat_sq_poll,
+ 		.maxlen		= sizeof(atomic_t),
+ 		.mode		= 0644,
+-		.proc_handler	= &read_reset_stat,
++		.proc_handler	= read_reset_stat,
+ 	},
+ 	{
+ 		.procname	= "rdma_stat_sq_prod",
+ 		.data		= &rdma_stat_sq_prod,
+ 		.maxlen		= sizeof(atomic_t),
+ 		.mode		= 0644,
+-		.proc_handler	= &read_reset_stat,
++		.proc_handler	= read_reset_stat,
+ 	},
+ 	{ },
+ };
+diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c
+index 4768160..7018eef 100644
+--- a/net/sunrpc/xprtrdma/transport.c
++++ b/net/sunrpc/xprtrdma/transport.c
+@@ -90,7 +90,7 @@ static ctl_table xr_tunables_table[] = {
+ 		.data		= &xprt_rdma_slot_table_entries,
+ 		.maxlen		= sizeof(unsigned int),
+ 		.mode		= 0644,
+-		.proc_handler	= &proc_dointvec_minmax,
++		.proc_handler	= proc_dointvec_minmax,
+ 		.extra1		= &min_slot_table_size,
+ 		.extra2		= &max_slot_table_size
+ 	},
+@@ -99,21 +99,21 @@ static ctl_table xr_tunables_table[] = {
+ 		.data		= &xprt_rdma_max_inline_read,
+ 		.maxlen		= sizeof(unsigned int),
+ 		.mode		= 0644,
+-		.proc_handler	= &proc_dointvec,
++		.proc_handler	= proc_dointvec,
+ 	},
+ 	{
+ 		.procname	= "rdma_max_inline_write",
+ 		.data		= &xprt_rdma_max_inline_write,
+ 		.maxlen		= sizeof(unsigned int),
+ 		.mode		= 0644,
+-		.proc_handler	= &proc_dointvec,
++		.proc_handler	= proc_dointvec,
+ 	},
+ 	{
+ 		.procname	= "rdma_inline_write_padding",
+ 		.data		= &xprt_rdma_inline_write_padding,
+ 		.maxlen		= sizeof(unsigned int),
+ 		.mode		= 0644,
+-		.proc_handler	= &proc_dointvec_minmax,
++		.proc_handler	= proc_dointvec_minmax,
+ 		.extra1		= &zero,
+ 		.extra2		= &max_padding,
+ 	},
+@@ -122,7 +122,7 @@ static ctl_table xr_tunables_table[] = {
+ 		.data		= &xprt_rdma_memreg_strategy,
+ 		.maxlen		= sizeof(unsigned int),
+ 		.mode		= 0644,
+-		.proc_handler	= &proc_dointvec_minmax,
++		.proc_handler	= proc_dointvec_minmax,
+ 		.extra1		= &min_memreg,
+ 		.extra2		= &max_memreg,
+ 	},
+@@ -131,7 +131,7 @@ static ctl_table xr_tunables_table[] = {
+ 		.data		= &xprt_rdma_pad_optimize,
+ 		.maxlen		= sizeof(unsigned int),
+ 		.mode		= 0644,
+-		.proc_handler	= &proc_dointvec,
++		.proc_handler	= proc_dointvec,
+ 	},
+ 	{ },
+ };
diff --git a/kernel_patches/backport/2.6.34/nfsrdma-headers-remove-sched.h-from-interrupt.h.patch b/kernel_patches/backport/2.6.34/nfsrdma-headers-remove-sched.h-from-interrupt.h.patch
new file mode 100644
index 0000000..cb430ca
--- /dev/null
+++ b/kernel_patches/backport/2.6.34/nfsrdma-headers-remove-sched.h-from-interrupt.h.patch
@@ -0,0 +1,23 @@
+From d43c36dc6b357fa1806800f18aa30123c747a6d1 Mon Sep 17 00:00:00 2001
+From: Alexey Dobriyan <adobriyan@gmail.com>
+Date: Wed, 7 Oct 2009 17:09:06 +0400
+Subject: [PATCH] headers: remove sched.h from interrupt.h
+
+After m68k's task_thread_info() doesn't refer to current,
+it's possible to remove sched.h from interrupt.h and not break m68k!
+Many thanks to Heiko Carstens for allowing this.
+
+Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
+---
+diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
+index 0cf5e8c..3fa5751 100644
+--- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
++++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
+@@ -42,6 +42,7 @@
+ #include <linux/sunrpc/svc_xprt.h>
+ #include <linux/sunrpc/debug.h>
+ #include <linux/sunrpc/rpc_rdma.h>
++#include <linux/sched.h>
+ #include <linux/spinlock.h>
+ #include <rdma/ib_verbs.h>
+ #include <rdma/rdma_cm.h>
diff --git a/kernel_patches/backport/2.6.34/nfsrdma-sunrpc-Clean-never-used-include-files.patch b/kernel_patches/backport/2.6.34/nfsrdma-sunrpc-Clean-never-used-include-files.patch
new file mode 100644
index 0000000..8787238
--- /dev/null
+++ b/kernel_patches/backport/2.6.34/nfsrdma-sunrpc-Clean-never-used-include-files.patch
@@ -0,0 +1,32 @@
+From a600ffcbb3743cf1296bee2a41d4824c719d7181 Mon Sep 17 00:00:00 2001
+From: Boaz Harrosh <bharrosh@panasas.com>
+Date: Thu, 3 Dec 2009 20:28:35 +0200
+Subject: [PATCH] sunrpc: Clean never used include files
+
+Remove include of two headers never used by this file.
+Doing so exposed a missing #include <linux/types.h> in
+include/linux/sunrpc/rpc_rdma.h.
+
+I did not see any other users dependency but if exist they
+should be fixed since these headers are totally irrelevant
+to here.
+
+Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
+Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
+---
+diff --git a/include/linux/sunrpc/rpc_rdma.h b/include/linux/sunrpc/rpc_rdma.h
+index 87b895d..b78f16b 100644
+--- a/include/linux/sunrpc/rpc_rdma.h
++++ b/include/linux/sunrpc/rpc_rdma.h
+@@ -40,6 +40,8 @@
+ #ifndef _LINUX_SUNRPC_RPC_RDMA_H
+ #define _LINUX_SUNRPC_RPC_RDMA_H
+ 
++#include <linux/types.h>
++
+ struct rpcrdma_segment {
+ 	__be32 rs_handle;	/* Registered memory handle */
+ 	__be32 rs_length;	/* Length of the chunk in bytes */
+-- 
+1.7.3.4
+
diff --git a/kernel_patches/backport/2.6.34/nfsrdma-sysctl-remove-struct-file-argument-of-proc_handler.patch b/kernel_patches/backport/2.6.34/nfsrdma-sysctl-remove-struct-file-argument-of-proc_handler.patch
new file mode 100644
index 0000000..fa3793a
--- /dev/null
+++ b/kernel_patches/backport/2.6.34/nfsrdma-sysctl-remove-struct-file-argument-of-proc_handler.patch
@@ -0,0 +1,37 @@
+From 8d65af789f3e2cf4cfbdbf71a0f7a61ebcd41d38 Mon Sep 17 00:00:00 2001
+From: Alexey Dobriyan <adobriyan@gmail.com>
+Date: Wed, 23 Sep 2009 15:57:19 -0700
+Subject: [PATCH] sysctl: remove "struct file *" argument of ->proc_handler
+
+It's unused.
+
+It isn't needed -- read or write flag is already passed and sysctl
+shouldn't care about the rest.
+
+It _was_ used in two places at arch/frv for some reason.
+
+Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
+Cc: David Howells <dhowells@redhat.com>
+Cc: "Eric W. Biederman" <ebiederm@xmission.com>
+Cc: Al Viro <viro@zeniv.linux.org.uk>
+Cc: Ralf Baechle <ralf@linux-mips.org>
+Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
+Cc: Ingo Molnar <mingo@elte.hu>
+Cc: "David S. Miller" <davem@davemloft.net>
+Cc: James Morris <jmorris@namei.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+---
+diff --git a/net/sunrpc/xprtrdma/svc_rdma.c b/net/sunrpc/xprtrdma/svc_rdma.c
+index 8710117..35fb68b 100644
+--- a/net/sunrpc/xprtrdma/svc_rdma.c
++++ b/net/sunrpc/xprtrdma/svc_rdma.c
+@@ -80,7 +80,7 @@ struct kmem_cache *svc_rdma_ctxt_cachep;
+  * current value.
+  */
+ static int read_reset_stat(ctl_table *table, int write,
+-			   struct file *filp, void __user *buffer, size_t *lenp,
++			   void __user *buffer, size_t *lenp,
+ 			   loff_t *ppos)
+ {
+ 	atomic_t *stat = (atomic_t *)table->data;
-- 
1.7.3.4

