diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-03-01 15:31:02 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-03-01 15:31:02 -0500 |
commit | c9fd43078f5007c6ca6b3a9cd04c51a8f0e44a20 (patch) | |
tree | 5a083b01e88afd591fdcce76ad14c4d7d028ac23 /fs/gfs2/ops_export.c | |
parent | e317ffcb7cc26c5e80cab97160a5e2761a4436ec (diff) |
[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>
Diffstat (limited to 'fs/gfs2/ops_export.c')
-rw-r--r-- | fs/gfs2/ops_export.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/ops_export.c b/fs/gfs2/ops_export.c index d149584cff30..a346943363c6 100644 --- a/fs/gfs2/ops_export.c +++ b/fs/gfs2/ops_export.c | |||
@@ -64,8 +64,8 @@ static int gfs2_encode_fh(struct dentry *dentry, __u32 *fh, int *len, | |||
64 | int connectable) | 64 | int connectable) |
65 | { | 65 | { |
66 | struct inode *inode = dentry->d_inode; | 66 | struct inode *inode = dentry->d_inode; |
67 | struct super_block *sb = inode->i_sb; | ||
67 | struct gfs2_inode *ip = inode->u.generic_ip; | 68 | struct gfs2_inode *ip = inode->u.generic_ip; |
68 | struct gfs2_sbd *sdp = ip->i_sbd; | ||
69 | 69 | ||
70 | if (*len < 4 || (connectable && *len < 8)) | 70 | if (*len < 4 || (connectable && *len < 8)) |
71 | return 255; | 71 | return 255; |
@@ -80,7 +80,7 @@ static int gfs2_encode_fh(struct dentry *dentry, __u32 *fh, int *len, | |||
80 | fh[3] = cpu_to_be32(fh[3]); | 80 | fh[3] = cpu_to_be32(fh[3]); |
81 | *len = 4; | 81 | *len = 4; |
82 | 82 | ||
83 | if (!connectable || ip == sdp->sd_root_dir->u.generic_ip) | 83 | if (!connectable || inode == sb->s_root->d_inode) |
84 | return *len; | 84 | return *len; |
85 | 85 | ||
86 | spin_lock(&dentry->d_lock); | 86 | spin_lock(&dentry->d_lock); |