[pnfs] [PATCH] fix mount/umount/mount problem

Marc Eshel eshel at almaden.ibm.com
Sat Jul 21 02:36:41 EDT 2007


From: Marc Eshel <eshel at almaden.ibm.com>

Fix mount/umount/mount problem. Need to zero the rpcclient after
it was shutdown.
---

 fs/nfs/nfs4filelayoutdev.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/fs/nfs/nfs4filelayoutdev.c b/fs/nfs/nfs4filelayoutdev.c
index 97e927b..6c4af9a 100644
--- a/fs/nfs/nfs4filelayoutdev.c
+++ b/fs/nfs/nfs4filelayoutdev.c
@@ -153,6 +153,10 @@ device_destroy(struct nfs4_pnfs_dev_item
 	if (!dev)
 		return;
 
+	dprintk("device_destroy: did=%u, ip=%x, port=%hu, rpcclient %p flags %x\n",
+		dev->dev_id, ntohl(dev->ip_addr), ntohs(dev->port),
+		dev->clp->cl_rpcclient, dev->clp->cl_exchange_flags);
+		
 	/* if not created for DS just return */
 	if (dev->clp->cl_exchange_flags & EXCHGID4_FLAG_USE_PNFS_DS) {
 
@@ -162,6 +166,7 @@ device_destroy(struct nfs4_pnfs_dev_item
 
 		/*	BUG_ON(!atomic_sub_and_test(0, &dev->count)); */
 		rpc_shutdown_client(dev->clp->cl_rpcclient);
+		dev->clp->cl_rpcclient = NULL;
 	}
 
 	kfree(dev);


More information about the pNFS mailing list