>From 6f9fb072fce5dfb8805b2b3010e102664ae032d5 Mon Sep 17 00:00:00 2001
From: Jeff Becker <Jeffrey.C.Becker@nasa.gov>
Date: Thu, 21 Jul 2011 10:49:36 -0700
Subject: [PATCH 4/5] Since OFED only builds sunrpc/xprtrdma/* (instead of all of NFS), remove
 patches that no longer apply.

Signed-off-by: Jeff Becker <Jeffrey.C.Becker@nasa.gov>
---
 .../fixes/nfsrdma_zz_0400_unrefcounted_creds.patch |   52 -----
 .../fixes/nfsrdma_zz_0500_O_DIRECT_Oops.patch      |  210 --------------------
 .../fixes/nfsrdma_zz_0600_lockd_ref_fix.patch      |   37 ----
 ...srdma_zz_0900_rpc_task_force_reencode_fix.patch |   12 --
 .../fixes/nfsrdma_zz_1100_eaddrnotavail_fix.patch  |   12 --
 .../nfsrdma_zz_1200_honor_autoclose_fix.patch      |   32 ---
 .../fixes/nfsrdma_zz_1300_xs_nospace_fix           |   43 ----
 .../nfsrdma_zz_1600_fix_xprt_transmit_race.patch   |   49 -----
 .../fixes/nfsrdma_zz_1900_remove_bad_put.patch     |   43 ----
 9 files changed, 0 insertions(+), 490 deletions(-)
 delete mode 100644 kernel_patches/fixes/nfsrdma_zz_0400_unrefcounted_creds.patch
 delete mode 100644 kernel_patches/fixes/nfsrdma_zz_0500_O_DIRECT_Oops.patch
 delete mode 100644 kernel_patches/fixes/nfsrdma_zz_0600_lockd_ref_fix.patch
 delete mode 100644 kernel_patches/fixes/nfsrdma_zz_0900_rpc_task_force_reencode_fix.patch
 delete mode 100644 kernel_patches/fixes/nfsrdma_zz_1100_eaddrnotavail_fix.patch
 delete mode 100644 kernel_patches/fixes/nfsrdma_zz_1200_honor_autoclose_fix.patch
 delete mode 100644 kernel_patches/fixes/nfsrdma_zz_1300_xs_nospace_fix
 delete mode 100644 kernel_patches/fixes/nfsrdma_zz_1600_fix_xprt_transmit_race.patch
 delete mode 100644 kernel_patches/fixes/nfsrdma_zz_1900_remove_bad_put.patch

diff --git a/kernel_patches/fixes/nfsrdma_zz_0400_unrefcounted_creds.patch b/kernel_patches/fixes/nfsrdma_zz_0400_unrefcounted_creds.patch
deleted file mode 100644
index 07e33f6..0000000
--- a/kernel_patches/fixes/nfsrdma_zz_0400_unrefcounted_creds.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-commit 033a666ccb842ab4134fcd0c861d5ba9f5d6bf3a
-
-From: David Howells <dhowells@redhat.com>
-
-NFSD: Don't hold unrefcounted creds over call to nfsd_setuser()
-
-    nfsd_open() gets an unrefcounted pointer to the current process's effective
-    credentials at the top of the function, then calls nfsd_setuser() via
-    fh_verify() - which may replace and destroy the current process's effective
-    credentials - and then passes the unrefcounted pointer to dentry_open() - but
-    the credentials may have been destroyed by this point.
-
-    Instead, the value from current_cred() should be passed directly to
-    dentry_open() as one of its arguments, rather than being cached in a variable.
-
-    Possibly fh_verify() should return the creds to use.
-
-    This is a regression introduced by
-    745ca2475a6ac596e3d8d37c2759c0fbe2586227 "CRED: Pass credentials through
-    dentry_open()".
-
-    Signed-off-by: David Howells <dhowells@redhat.com>
-    Tested-and-Verified-By: Steve Dickson <steved@redhat.com>
-    Cc: stable@kernel.org
-    Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
----
-
- fs/nfsd/vfs.c |    3 +--
- 1 files changed, 1 insertions(+), 2 deletions(-)
-
-
-diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
-index b660435..7843755 100644
---- a/fs/nfsd/vfs.c
-+++ b/fs/nfsd/vfs.c
-@@ -677,7 +677,6 @@ __be32
- nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, int type,
- 			int access, struct file **filp)
- {
--	const struct cred *cred = current_cred();
- 	struct dentry	*dentry;
- 	struct inode	*inode;
- 	int		flags = O_RDONLY|O_LARGEFILE;
-@@ -732,7 +731,7 @@ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, int type,
- 		vfs_dq_init(inode);
- 	}
- 	*filp = dentry_open(dget(dentry), mntget(fhp->fh_export->ex_path.mnt),
--			    flags, cred);
-+			    flags, current_cred());
- 	if (IS_ERR(*filp))
- 		host_err = PTR_ERR(*filp);
- out_nfserr:
diff --git a/kernel_patches/fixes/nfsrdma_zz_0500_O_DIRECT_Oops.patch b/kernel_patches/fixes/nfsrdma_zz_0500_O_DIRECT_Oops.patch
deleted file mode 100644
index 206186b..0000000
--- a/kernel_patches/fixes/nfsrdma_zz_0500_O_DIRECT_Oops.patch
+++ /dev/null
@@ -1,210 +0,0 @@
-commit 1ae88b2e446261c038f2c0c3150ffae142b227a2
-Author: Trond Myklebust <Trond.Myklebust@netapp.com>
-Date:   Wed Aug 12 09:12:30 2009 -0400
-
-    NFS: Fix an O_DIRECT Oops...
-    
-    We can't call nfs_readdata_release()/nfs_writedata_release() without
-    first initialising and referencing args.context. Doing so inside
-    nfs_direct_read_schedule_segment()/nfs_direct_write_schedule_segment()
-    causes an Oops.
-    
-    We should rather be calling nfs_readdata_free()/nfs_writedata_free() in
-    those cases.
-    
-    Looking at the O_DIRECT code, the "struct nfs_direct_req" is already
-    referencing the nfs_open_context for us. Since the readdata and writedata
-    structures carry a reference to that, we can simplify things by getting rid
-    of the extra nfs_open_context references, so that we can replace all
-    instances of nfs_readdata_release()/nfs_writedata_release().
-    
-    Reported-by: Catalin Marinas <catalin.marinas@arm.com>
-    Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-    Tested-by: Catalin Marinas <catalin.marinas@arm.com>
-    Cc: stable@kernel.org
-    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-
-diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
-index 489fc01..e4e089a 100644
---- a/fs/nfs/direct.c
-+++ b/fs/nfs/direct.c
-@@ -255,7 +255,7 @@ static void nfs_direct_read_release(void *calldata)
- 
- 	if (put_dreq(dreq))
- 		nfs_direct_complete(dreq);
--	nfs_readdata_release(calldata);
-+	nfs_readdata_free(data);
- }
- 
- static const struct rpc_call_ops nfs_read_direct_ops = {
-@@ -314,14 +314,14 @@ static ssize_t nfs_direct_read_schedule_segment(struct nfs_direct_req *dreq,
- 					data->npages, 1, 0, data->pagevec, NULL);
- 		up_read(&current->mm->mmap_sem);
- 		if (result < 0) {
--			nfs_readdata_release(data);
-+			nfs_readdata_free(data);
- 			break;
- 		}
- 		if ((unsigned)result < data->npages) {
- 			bytes = result * PAGE_SIZE;
- 			if (bytes <= pgbase) {
- 				nfs_direct_release_pages(data->pagevec, result);
--				nfs_readdata_release(data);
-+				nfs_readdata_free(data);
- 				break;
- 			}
- 			bytes -= pgbase;
-@@ -334,7 +334,7 @@ static ssize_t nfs_direct_read_schedule_segment(struct nfs_direct_req *dreq,
- 		data->inode = inode;
- 		data->cred = msg.rpc_cred;
- 		data->args.fh = NFS_FH(inode);
--		data->args.context = get_nfs_open_context(ctx);
-+		data->args.context = ctx;
- 		data->args.offset = pos;
- 		data->args.pgbase = pgbase;
- 		data->args.pages = data->pagevec;
-@@ -441,7 +441,7 @@ static void nfs_direct_free_writedata(struct nfs_direct_req *dreq)
- 		struct nfs_write_data *data = list_entry(dreq->rewrite_list.next, struct nfs_write_data, pages);
- 		list_del(&data->pages);
- 		nfs_direct_release_pages(data->pagevec, data->npages);
--		nfs_writedata_release(data);
-+		nfs_writedata_free(data);
- 	}
- }
- 
-@@ -534,7 +534,7 @@ static void nfs_direct_commit_release(void *calldata)
- 
- 	dprintk("NFS: %5u commit returned %d\n", data->task.tk_pid, status);
- 	nfs_direct_write_complete(dreq, data->inode);
--	nfs_commitdata_release(calldata);
-+	nfs_commit_free(data);
- }
- 
- static const struct rpc_call_ops nfs_commit_direct_ops = {
-@@ -570,7 +570,7 @@ static void nfs_direct_commit_schedule(struct nfs_direct_req *dreq)
- 	data->args.fh = NFS_FH(data->inode);
- 	data->args.offset = 0;
- 	data->args.count = 0;
--	data->args.context = get_nfs_open_context(dreq->ctx);
-+	data->args.context = dreq->ctx;
- 	data->res.count = 0;
- 	data->res.fattr = &data->fattr;
- 	data->res.verf = &data->verf;
-@@ -734,14 +734,14 @@ static ssize_t nfs_direct_write_schedule_segment(struct nfs_direct_req *dreq,
- 					data->npages, 0, 0, data->pagevec, NULL);
- 		up_read(&current->mm->mmap_sem);
- 		if (result < 0) {
--			nfs_writedata_release(data);
-+			nfs_writedata_free(data);
- 			break;
- 		}
- 		if ((unsigned)result < data->npages) {
- 			bytes = result * PAGE_SIZE;
- 			if (bytes <= pgbase) {
- 				nfs_direct_release_pages(data->pagevec, result);
--				nfs_writedata_release(data);
-+				nfs_writedata_free(data);
- 				break;
- 			}
- 			bytes -= pgbase;
-@@ -756,7 +756,7 @@ static ssize_t nfs_direct_write_schedule_segment(struct nfs_direct_req *dreq,
- 		data->inode = inode;
- 		data->cred = msg.rpc_cred;
- 		data->args.fh = NFS_FH(inode);
--		data->args.context = get_nfs_open_context(ctx);
-+		data->args.context = ctx;
- 		data->args.offset = pos;
- 		data->args.pgbase = pgbase;
- 		data->args.pages = data->pagevec;
-diff --git a/fs/nfs/read.c b/fs/nfs/read.c
-index 73ea5e8..12c9e66 100644
---- a/fs/nfs/read.c
-+++ b/fs/nfs/read.c
-@@ -60,17 +60,15 @@ struct nfs_read_data *nfs_readdata_alloc(unsigned int pagecount)
- 	return p;
- }
- 
--static void nfs_readdata_free(struct nfs_read_data *p)
-+void nfs_readdata_free(struct nfs_read_data *p)
- {
- 	if (p && (p->pagevec != &p->page_array[0]))
- 		kfree(p->pagevec);
- 	mempool_free(p, nfs_rdata_mempool);
- }
- 
--void nfs_readdata_release(void *data)
-+static void nfs_readdata_release(struct nfs_read_data *rdata)
- {
--	struct nfs_read_data *rdata = data;
--
- 	put_nfs_open_context(rdata->args.context);
- 	nfs_readdata_free(rdata);
- }
-diff --git a/fs/nfs/write.c b/fs/nfs/write.c
-index 0a0a2ff..a34fae2 100644
---- a/fs/nfs/write.c
-+++ b/fs/nfs/write.c
-@@ -87,17 +87,15 @@ struct nfs_write_data *nfs_writedata_alloc(unsigned int pagecount)
- 	return p;
- }
- 
--static void nfs_writedata_free(struct nfs_write_data *p)
-+void nfs_writedata_free(struct nfs_write_data *p)
- {
- 	if (p && (p->pagevec != &p->page_array[0]))
- 		kfree(p->pagevec);
- 	mempool_free(p, nfs_wdata_mempool);
- }
- 
--void nfs_writedata_release(void *data)
-+static void nfs_writedata_release(struct nfs_write_data *wdata)
- {
--	struct nfs_write_data *wdata = data;
--
- 	put_nfs_open_context(wdata->args.context);
- 	nfs_writedata_free(wdata);
- }
-diff --git a/include-nfs/linux/nfs_fs.h b/include-nfs/linux/nfs_fs.h
-index fdffb41..f6b9024 100644
---- a/include-nfs/linux/nfs_fs.h
-+++ b/include-nfs/linux/nfs_fs.h
-@@ -473,7 +473,6 @@ extern int  nfs_writepages(struct address_space *, struct writeback_control *);
- extern int  nfs_flush_incompatible(struct file *file, struct page *page);
- extern int  nfs_updatepage(struct file *, struct page *, unsigned int, unsigned int);
- extern int nfs_writeback_done(struct rpc_task *, struct nfs_write_data *);
--extern void nfs_writedata_release(void *);
- 
- /*
-  * Try to write back everything synchronously (but check the
-@@ -488,7 +487,6 @@ extern int nfs_wb_page_cancel(struct inode *inode, struct page* page);
- extern int  nfs_commit_inode(struct inode *, int);
- extern struct nfs_write_data *nfs_commitdata_alloc(void);
- extern void nfs_commit_free(struct nfs_write_data *wdata);
--extern void nfs_commitdata_release(void *wdata);
- #else
- static inline int
- nfs_commit_inode(struct inode *inode, int how)
-@@ -507,6 +505,7 @@ nfs_have_writebacks(struct inode *inode)
-  * Allocate nfs_write_data structures
-  */
- extern struct nfs_write_data *nfs_writedata_alloc(unsigned int npages);
-+extern void nfs_writedata_free(struct nfs_write_data *);
- 
- /*
-  * linux/fs/nfs/read.c
-@@ -515,7 +514,6 @@ extern int  nfs_readpage(struct file *, struct page *);
- extern int  nfs_readpages(struct file *, struct address_space *,
- 		struct list_head *, unsigned);
- extern int  nfs_readpage_result(struct rpc_task *, struct nfs_read_data *);
--extern void nfs_readdata_release(void *data);
- extern int  nfs_readpage_async(struct nfs_open_context *, struct inode *,
- 			       struct page *);
- 
-@@ -523,6 +521,7 @@ extern int  nfs_readpage_async(struct nfs_open_context *, struct inode *,
-  * Allocate nfs_read_data structures
-  */
- extern struct nfs_read_data *nfs_readdata_alloc(unsigned int npages);
-+extern void nfs_readdata_free(struct nfs_read_data *);
- 
- /*
-  * linux/fs/nfs3proc.c
diff --git a/kernel_patches/fixes/nfsrdma_zz_0600_lockd_ref_fix.patch b/kernel_patches/fixes/nfsrdma_zz_0600_lockd_ref_fix.patch
deleted file mode 100644
index 8388481..0000000
--- a/kernel_patches/fixes/nfsrdma_zz_0600_lockd_ref_fix.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-nfsd: Add lockd up/down logic for transports created in the kernel.
-
-From: Steve Wise <swise@opengridcomputing.com>
-
-The nfsd transport initialization logic also starts and stops the lockd. Add
-logic to start and stop the daemon for transports added from kernel-space
-as well as user-space.
-
-signed-off-by: Steve Wise <swise@opengridcomputing.com>
----
-
- fs/nfsd/nfsctl.c |    4 ++++
- 1 files changed, 4 insertions(+), 0 deletions(-)
-
-
-diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
-index af16849..eb6973c 100644
---- a/fs/nfsd/nfsctl.c
-+++ b/fs/nfsd/nfsctl.c
-@@ -980,6 +980,9 @@ static ssize_t __write_ports(struct file *file, char *buf, size_t size)
- 					/* Give a reasonable perror msg for
- 					 * bad transport string */
- 					err = -EPROTONOSUPPORT;
-+				if (err >= 0)
-+					lockd_up();
-+				nfsd_serv->sv_nrthreads--;
- 			}
- 			return err < 0 ? err : 0;
- 		}
-@@ -1002,6 +1005,7 @@ static ssize_t __write_ports(struct file *file, char *buf, size_t size)
- 					svc_close_xprt(xprt);
- 					svc_xprt_put(xprt);
- 					err = 0;
-+					lockd_down();
- 				} else
- 					err = -ENOTCONN;
- 			}
diff --git a/kernel_patches/fixes/nfsrdma_zz_0900_rpc_task_force_reencode_fix.patch b/kernel_patches/fixes/nfsrdma_zz_0900_rpc_task_force_reencode_fix.patch
deleted file mode 100644
index 5028b86..0000000
--- a/kernel_patches/fixes/nfsrdma_zz_0900_rpc_task_force_reencode_fix.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
-index 5abab09..8d02e05 100644
---- a/net/sunrpc/clnt.c
-+++ b/net/sunrpc/clnt.c
-@@ -876,6 +876,7 @@ static inline void
- rpc_task_force_reencode(struct rpc_task *task)
- {
- 	task->tk_rqstp->rq_snd_buf.len = 0;
-+	task->tk_rqstp->rq_bytes_sent = 0;
- }
- 
- static inline void
diff --git a/kernel_patches/fixes/nfsrdma_zz_1100_eaddrnotavail_fix.patch b/kernel_patches/fixes/nfsrdma_zz_1100_eaddrnotavail_fix.patch
deleted file mode 100644
index 249d1b2..0000000
--- a/kernel_patches/fixes/nfsrdma_zz_1100_eaddrnotavail_fix.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
-index 92a5c42..c90414f 100644
---- a/net/sunrpc/xprtsock.c
-+++ b/net/sunrpc/xprtsock.c
-@@ -1799,6 +1799,7 @@ static void xs_tcp_setup_socket(struct rpc_xprt *xprt,
- 		 */
- 		set_bit(XPRT_CONNECTION_CLOSE, &xprt->state);
- 		xprt_force_disconnect(xprt);
-+		break;
- 	case -ECONNREFUSED:
- 	case -ECONNRESET:
- 	case -ENETUNREACH:
diff --git a/kernel_patches/fixes/nfsrdma_zz_1200_honor_autoclose_fix.patch b/kernel_patches/fixes/nfsrdma_zz_1200_honor_autoclose_fix.patch
deleted file mode 100644
index 96e788d..0000000
--- a/kernel_patches/fixes/nfsrdma_zz_1200_honor_autoclose_fix.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-commit feb8ca37cc3d83c07fd042509ef1e176cfeb2cfa
-
-From: Trond Myklebust <Trond.Myklebust@netapp.com>
-
-SUNRPC: Ensure that we honour autoclose before attempting to reconnect
-
-    If the XPRT_CLOSE_WAIT flag is set, we need to ensure that we call
-    xprt->ops->close() while holding xprt_lock_write() before we can
-    start reconnecting.
-
-    Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
----
-
- net/sunrpc/xprt.c |    4 ++++
- 1 files changed, 4 insertions(+), 0 deletions(-)
-
-
-diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
-index 06ca058..1b04e60 100644
---- a/net/sunrpc/xprt.c
-+++ b/net/sunrpc/xprt.c
-@@ -697,6 +697,10 @@ void xprt_connect(struct rpc_task *task)
- 	}
- 	if (!xprt_lock_write(xprt, task))
- 		return;
-+
-+	if (test_and_clear_bit(XPRT_CLOSE_WAIT, &xprt->state))
-+		xprt->ops->close(xprt);
-+
- 	if (xprt_connected(xprt))
- 		xprt_release_write(xprt, task);
- 	else {
diff --git a/kernel_patches/fixes/nfsrdma_zz_1300_xs_nospace_fix b/kernel_patches/fixes/nfsrdma_zz_1300_xs_nospace_fix
deleted file mode 100644
index 02f5445..0000000
--- a/kernel_patches/fixes/nfsrdma_zz_1300_xs_nospace_fix
+++ /dev/null
@@ -1,43 +0,0 @@
-xprtsock: Fix xs_nospace to return EAGAIN by default
-
-From: Tom Tucker <tom@ogc.us>
-
-The xs_nospace function is called to handle EAGAIN
-from underlyling kernel sockets services. The
-function has a race such that SOCK_ASYNC_NOSPACE
-can be reset before it is tested. If this happens,
-xs_nospace will return 0 instead of EAGAIN. This
-changes the interpretation to 'partial send' and
-xs_tcp_release_rqst will tear down the connection.
-
-Change the default return from xs_nospace to EAGAIN
-to handle this race properly.
-
-Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
----
-
- net/sunrpc/xprtsock.c |    3 +--
- 1 files changed, 1 insertions(+), 2 deletions(-)
-
-
-diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
-index c90414f..91c3d42 100644
---- a/net/sunrpc/xprtsock.c
-+++ b/net/sunrpc/xprtsock.c
-@@ -537,7 +537,7 @@ static int xs_nospace(struct rpc_task *task)
- 	struct rpc_rqst *req = task->tk_rqstp;
- 	struct rpc_xprt *xprt = req->rq_xprt;
- 	struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt);
--	int ret = 0;
-+	int ret = -EAGAIN;
- 
- 	dprintk("RPC: %5u xmit incomplete (%u left of %u)\n",
- 			task->tk_pid, req->rq_slen - req->rq_bytes_sent,
-@@ -549,7 +549,6 @@ static int xs_nospace(struct rpc_task *task)
- 	/* Don't race with disconnect */
- 	if (xprt_connected(xprt)) {
- 		if (test_bit(SOCK_ASYNC_NOSPACE, &transport->sock->flags)) {
--			ret = -EAGAIN;
- 			/*
- 			 * Notify TCP that we're limited by the application
- 			 * window size
diff --git a/kernel_patches/fixes/nfsrdma_zz_1600_fix_xprt_transmit_race.patch b/kernel_patches/fixes/nfsrdma_zz_1600_fix_xprt_transmit_race.patch
deleted file mode 100644
index de97d2b..0000000
--- a/kernel_patches/fixes/nfsrdma_zz_1600_fix_xprt_transmit_race.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-rpcrdma: Fix rq_list race in xprt_transmit
-
-From: Tom Tucker <tom@ogc.us>
-
-Move the spin lock to protect rq_received and rq_list when electing
-to transmit a new request. This function races with the reply
-handler as part of the retransmit path.
-
-Absent this change, the request can be added back to the list as a reply is
-being processed.
-
-Signed-off-by: Tom Tucker <tom@ogc.us>
----
-
- net/sunrpc/xprt.c |    8 +++++---
- 1 files changed, 5 insertions(+), 3 deletions(-)
-
-
-diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
-index 06ca058..a5150e8 100644
---- a/net/sunrpc/xprt.c
-+++ b/net/sunrpc/xprt.c
-@@ -872,21 +872,23 @@ void xprt_transmit(struct rpc_task *task)
- 
- 	dprintk("RPC: %5u xprt_transmit(%u)\n", task->tk_pid, req->rq_slen);
- 
-+	spin_lock_bh(&xprt->transport_lock);
- 	if (!req->rq_received) {
- 		if (list_empty(&req->rq_list)) {
--			spin_lock_bh(&xprt->transport_lock);
- 			/* Update the softirq receive buffer */
- 			memcpy(&req->rq_private_buf, &req->rq_rcv_buf,
- 					sizeof(req->rq_private_buf));
- 			/* Add request to the receive list */
- 			list_add_tail(&req->rq_list, &xprt->recv);
--			spin_unlock_bh(&xprt->transport_lock);
- 			xprt_reset_majortimeo(req);
- 			/* Turn off autodisconnect */
- 			del_singleshot_timer_sync(&xprt->timer);
- 		}
--	} else if (!req->rq_bytes_sent)
-+		spin_unlock_bh(&xprt->transport_lock);
-+	} else if (!req->rq_bytes_sent) {
-+		spin_unlock_bh(&xprt->transport_lock);
- 		return;
-+	}
- 
- 	req->rq_connect_cookie = xprt->connect_cookie;
- 	req->rq_xtime = jiffies;
diff --git a/kernel_patches/fixes/nfsrdma_zz_1900_remove_bad_put.patch b/kernel_patches/fixes/nfsrdma_zz_1900_remove_bad_put.patch
deleted file mode 100644
index ea0e184..0000000
--- a/kernel_patches/fixes/nfsrdma_zz_1900_remove_bad_put.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-sunrpc: remove unnecessary svc_xprt_put
-
-From: Neil Brown <neilb@suse.de>
-
-commit ab1b18f70a007ea6caeb007d269abb75b131a410 upstream.
-
-The 'struct svc_deferred_req's on the xpt_deferred queue do not
-own a reference to the owning xprt.  This is seen in svc_revisit
-which is where things are added to this queue.  dr->xprt is set to
-NULL and the reference to the xprt it put.
-
-So when this list is cleaned up in svc_delete_xprt, we mustn't
-put the reference.
-
-Also, replace the 'for' with a 'while' which is arguably
-simpler and more likely to compile efficiently.
-
-Signed-off-by: NeilBrown <neilb@suse.de>
-Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
----
-
- net/sunrpc/svc_xprt.c |    5 +----
- 1 files changed, 1 insertions(+), 4 deletions(-)
-
-
-diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c
-index c200d92..b99558f 100644
---- a/net/sunrpc/svc_xprt.c
-+++ b/net/sunrpc/svc_xprt.c
-@@ -894,11 +894,8 @@ void svc_delete_xprt(struct svc_xprt *xprt)
- 	if (test_bit(XPT_TEMP, &xprt->xpt_flags))
- 		serv->sv_tmpcnt--;
- 
--	for (dr = svc_deferred_dequeue(xprt); dr;
--	     dr = svc_deferred_dequeue(xprt)) {
--		svc_xprt_put(xprt);
-+	while ((dr = svc_deferred_dequeue(xprt)) != NULL)
- 		kfree(dr);
--	}
- 
- 	svc_xprt_put(xprt);
- 	spin_unlock_bh(&serv->sv_lock);
-- 
1.7.3.4

