[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>
This commit is contained in:
Steven Whitehouse
2006-03-01 15:31:02 -05:00
parent e317ffcb7c
commit c9fd43078f
8 changed files with 27 additions and 54 deletions

View File

@@ -447,25 +447,6 @@ int gfs2_jdesc_check(struct gfs2_jdesc *jd)
return error;
}
int gfs2_lookup_master_dir(struct gfs2_sbd *sdp)
{
struct inode *inode = NULL;
struct gfs2_glock *gl;
int error;
error = gfs2_glock_get(sdp,
sdp->sd_sb.sb_master_dir.no_addr,
&gfs2_inode_glops, CREATE, &gl);
if (!error) {
error = gfs2_lookup_simple(sdp->sd_root_dir, ".gfs2_admin",
&inode);
sdp->sd_master_dir = inode;
gfs2_glock_put(gl);
}
return error;
}
/**
* gfs2_make_fs_rw - Turn a Read-Only FS into a Read-Write one
* @sdp: the filesystem