diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2009-06-10 05:31:45 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2009-06-10 05:31:45 -0400 |
commit | 003dec8913d6bebb4ecc989ec04a235cf38f5ea9 (patch) | |
tree | 5a062c995c471190d2148af21b42db0f9d4294b4 /fs | |
parent | 40bc9a27e00d6c8c7e4dc2865c02d7402a950472 (diff) |
GFS2: Merge gfs2_get_sb into gfs2_get_sb_meta
These don't need to be separate functions.
Reported-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/gfs2/ops_fstype.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index 9da161cbb30f..f234aba36fb8 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c | |||
@@ -1284,9 +1284,11 @@ static int set_meta_super(struct super_block *s, void *ptr) | |||
1284 | return -EINVAL; | 1284 | return -EINVAL; |
1285 | } | 1285 | } |
1286 | 1286 | ||
1287 | static struct super_block *get_gfs2_sb(const char *dev_name) | 1287 | static int gfs2_get_sb_meta(struct file_system_type *fs_type, int flags, |
1288 | const char *dev_name, void *data, struct vfsmount *mnt) | ||
1288 | { | 1289 | { |
1289 | struct super_block *s; | 1290 | struct super_block *s; |
1291 | struct gfs2_sbd *sdp; | ||
1290 | struct path path; | 1292 | struct path path; |
1291 | int error; | 1293 | int error; |
1292 | 1294 | ||
@@ -1294,21 +1296,11 @@ static struct super_block *get_gfs2_sb(const char *dev_name) | |||
1294 | if (error) { | 1296 | if (error) { |
1295 | printk(KERN_WARNING "GFS2: path_lookup on %s returned error %d\n", | 1297 | printk(KERN_WARNING "GFS2: path_lookup on %s returned error %d\n", |
1296 | dev_name, error); | 1298 | dev_name, error); |
1297 | return ERR_PTR(-ENOENT); | 1299 | return error; |
1298 | } | 1300 | } |
1299 | s = sget(&gfs2_fs_type, test_meta_super, set_meta_super, | 1301 | s = sget(&gfs2_fs_type, test_meta_super, set_meta_super, |
1300 | path.dentry->d_inode->i_sb->s_bdev); | 1302 | path.dentry->d_inode->i_sb->s_bdev); |
1301 | path_put(&path); | 1303 | path_put(&path); |
1302 | return s; | ||
1303 | } | ||
1304 | |||
1305 | static int gfs2_get_sb_meta(struct file_system_type *fs_type, int flags, | ||
1306 | const char *dev_name, void *data, struct vfsmount *mnt) | ||
1307 | { | ||
1308 | struct super_block *s; | ||
1309 | struct gfs2_sbd *sdp; | ||
1310 | |||
1311 | s = get_gfs2_sb(dev_name); | ||
1312 | if (IS_ERR(s)) { | 1304 | if (IS_ERR(s)) { |
1313 | printk(KERN_WARNING "GFS2: gfs2 mount does not exist\n"); | 1305 | printk(KERN_WARNING "GFS2: gfs2 mount does not exist\n"); |
1314 | return PTR_ERR(s); | 1306 | return PTR_ERR(s); |