

Don't just get the rootfh on referral traversal, get the fh of the mount path!

Signed-off-by: Andy Adamson <andros@citi.umich.edu>
---


diff -puN fs/nfs/client.c~referral-path-walk fs/nfs/client.c
--- linux-2.6.18-rc5/fs/nfs/client.c~referral-path-walk	2006-09-05 15:16:41.000000000 -0400
+++ linux-2.6.18-rc5-andros/fs/nfs/client.c	2006-09-05 15:53:32.000000000 -0400
@@ -1041,7 +1041,6 @@ struct nfs_server *nfs4_create_referral_
 	struct nfs_client *parent_client;
 	struct nfs_server *server, *parent_server;
 	struct nfs_fattr fattr;
-	struct nfs_fsinfo fsinfo;
 	int error;
 
 	dprintk("--> nfs4_create_referral_server()\n");
@@ -1076,16 +1075,9 @@ struct nfs_server *nfs4_create_referral_
 	BUG_ON(!server->nfs_client->rpc_ops->file_inode_ops);
 
 	/* Probe the root fh to retrieve its FSID */
-	fsinfo.fattr = &fattr;
-	nfs_fattr_init(&fattr);
-	error = server->nfs_client->rpc_ops->getroot(server, fh, &fsinfo);
+	error = nfs4_path_walk(server, fh, data->mnt_path);
 	if (error < 0)
 		goto error;
-	if (fattr.type != NFDIR) {
-		printk(KERN_ERR "nfs4_create_referral_server:"
-		" getroot encountered non-directory\n");
-		return ERR_PTR(-ENOTDIR);
-	}
 	dprintk("%s Server FSID: %llx:%llx\n", __FUNCTION__, server->fsid.major, server->fsid.minor);
 	dprintk("%s Mount FH: %d\n", __FUNCTION__, fh->size);
 
_
