Commit 003dec89 authored by Steven Whitehouse's avatar Steven Whitehouse

GFS2: Merge gfs2_get_sb into gfs2_get_sb_meta

These don't need to be separate functions.
Reported-by: default avatarChristoph Hellwig <hch@infradead.org>
Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
parent 40bc9a27
...@@ -1284,9 +1284,11 @@ static int set_meta_super(struct super_block *s, void *ptr) ...@@ -1284,9 +1284,11 @@ static int set_meta_super(struct super_block *s, void *ptr)
return -EINVAL; return -EINVAL;
} }
static struct super_block *get_gfs2_sb(const char *dev_name) static int gfs2_get_sb_meta(struct file_system_type *fs_type, int flags,
const char *dev_name, void *data, struct vfsmount *mnt)
{ {
struct super_block *s; struct super_block *s;
struct gfs2_sbd *sdp;
struct path path; struct path path;
int error; int error;
...@@ -1294,21 +1296,11 @@ static struct super_block *get_gfs2_sb(const char *dev_name) ...@@ -1294,21 +1296,11 @@ static struct super_block *get_gfs2_sb(const char *dev_name)
if (error) { if (error) {
printk(KERN_WARNING "GFS2: path_lookup on %s returned error %d\n", printk(KERN_WARNING "GFS2: path_lookup on %s returned error %d\n",
dev_name, error); dev_name, error);
return ERR_PTR(-ENOENT); return error;
} }
s = sget(&gfs2_fs_type, test_meta_super, set_meta_super, s = sget(&gfs2_fs_type, test_meta_super, set_meta_super,
path.dentry->d_inode->i_sb->s_bdev); path.dentry->d_inode->i_sb->s_bdev);
path_put(&path); path_put(&path);
return s;
}
static int gfs2_get_sb_meta(struct file_system_type *fs_type, int flags,
const char *dev_name, void *data, struct vfsmount *mnt)
{
struct super_block *s;
struct gfs2_sbd *sdp;
s = get_gfs2_sb(dev_name);
if (IS_ERR(s)) { if (IS_ERR(s)) {
printk(KERN_WARNING "GFS2: gfs2 mount does not exist\n"); printk(KERN_WARNING "GFS2: gfs2 mount does not exist\n");
return PTR_ERR(s); return PTR_ERR(s);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment