[pnfs] [PATCH 4/5] Shut down the v4 style callback server for v4.1

iyer at netapp.com iyer at netapp.com
Tue Apr 17 00:06:52 EDT 2007


From: Rahul Iyer <iyer at netapp.com>

This patch shuts down the v4.1 server in case the mount is a v4.1 mount. If
it's a v4 mount, nothing changes.

Signed-off-by: Rahul Iyer <iyer at netapp.com>
---
 fs/nfs/super.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 89eb564..3411ea1 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -1270,8 +1270,17 @@ static int nfs4_fill_super(struct super_block *sb, struct nfs4_mount_data *data,
                                 printk(KERN_EMERG "Couldn't mount using minorversion %d\n", i);
                                 rpc_shutdown_client(server->client);
                         }
-			else
+			else {
+				/* We successfully managed to set up a session.
+				 * Since the v4.1 callbacks are different from
+				 * that of v4, shutdown the v4 callback server
+				 * started up in nfs4_alloc_client
+				 */
+				if (i > 0)
+					nfs_callback_down();
+				
 				break;
+			}
                 }
         }
 
-- 
1.5.0.2


More information about the pNFS mailing list