[GFS2] Tidy up mount code.

We no longer lookup ".gfs2_admin" in the root directory in order to
find it, but instead use the inode number given in the superblock.
Both the root directory and the admin directory are now looked up using
the same routine, so the redundant code is removed.

Also, there is no longer a reference to the root inode in the
GFS2 super block. When required this can be retreived via
sb->s_root->d_inode instead.

Assuming that we introduce a metadata filesystem type for GFS, then
this is a first step towards that goal.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index ea9e996..cd1de61 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -288,7 +288,7 @@
  * Returns: errno
  */
 
-static int inode_create(struct gfs2_glock *i_gl, struct gfs2_inum *inum,
+static int inode_create(struct gfs2_glock *i_gl, const struct gfs2_inum *inum,
 			struct gfs2_glock *io_gl, unsigned int io_state,
 			struct gfs2_inode **ipp)
 {
@@ -354,8 +354,8 @@
  * Returns: errno
  */
 
-int gfs2_inode_get(struct gfs2_glock *i_gl, struct gfs2_inum *inum, int create,
-		   struct gfs2_inode **ipp)
+int gfs2_inode_get(struct gfs2_glock *i_gl, const struct gfs2_inum *inum,
+		   int create, struct gfs2_inode **ipp)
 {
 	struct gfs2_sbd *sdp = i_gl->gl_sbd;
 	struct gfs2_glock *io_gl;
@@ -718,6 +718,7 @@
 int gfs2_lookupi(struct inode *dir, struct qstr *name, int is_root,
 		 struct inode **inodep)
 {
+	struct super_block *sb = dir->i_sb;
 	struct gfs2_inode *ipp;
 	struct gfs2_inode *dip = dir->u.generic_ip;
 	struct gfs2_sbd *sdp = dip->i_sbd;
@@ -733,7 +734,7 @@
 		return -ENAMETOOLONG;
 
 	if (gfs2_filecmp(name, ".", 1) ||
-	    (gfs2_filecmp(name, "..", 2) && dir == sdp->sd_root_dir)) {
+	    (gfs2_filecmp(name, "..", 2) && dir == sb->s_root->d_inode)) {
 		gfs2_inode_hold(dip);
 		ipp = dip;
 		goto done;
@@ -1466,8 +1467,8 @@
 
 int gfs2_ok_to_move(struct gfs2_inode *this, struct gfs2_inode *to)
 {
-	struct gfs2_sbd *sdp = this->i_sbd;
 	struct inode *dir = to->i_vnode;
+	struct super_block *sb = dir->i_sb;
 	struct inode *tmp;
 	struct qstr dotdot;
 	int error = 0;
@@ -1483,7 +1484,7 @@
 			error = -EINVAL;
 			break;
 		}
-		if (dir == sdp->sd_root_dir) {
+		if (dir == sb->s_root->d_inode) {
 			error = 0;
 			break;
 		}