Skip to content

Commit

Permalink
new helper: mount_bdev()
Browse files Browse the repository at this point in the history
... and switch of the obvious get_sb_bdev() users to ->mount()

Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed Oct 29, 2010
1 parent c96e41e commit 152a083
Show file tree
Hide file tree
Showing 31 changed files with 150 additions and 161 deletions.
9 changes: 4 additions & 5 deletions fs/adfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -490,17 +490,16 @@ static int adfs_fill_super(struct super_block *sb, void *data, int silent)
return -EINVAL;
}

static int adfs_get_sb(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data, struct vfsmount *mnt)
static struct dentry *adfs_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
return get_sb_bdev(fs_type, flags, dev_name, data, adfs_fill_super,
mnt);
return mount_bdev(fs_type, flags, dev_name, data, adfs_fill_super);
}

static struct file_system_type adfs_fs_type = {
.owner = THIS_MODULE,
.name = "adfs",
.get_sb = adfs_get_sb,
.mount = adfs_mount,
.kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
};
Expand Down
9 changes: 4 additions & 5 deletions fs/affs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -573,17 +573,16 @@ affs_statfs(struct dentry *dentry, struct kstatfs *buf)
return 0;
}

static int affs_get_sb(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data, struct vfsmount *mnt)
static struct dentry *affs_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
return get_sb_bdev(fs_type, flags, dev_name, data, affs_fill_super,
mnt);
return mount_bdev(fs_type, flags, dev_name, data, affs_fill_super);
}

static struct file_system_type affs_fs_type = {
.owner = THIS_MODULE,
.name = "affs",
.get_sb = affs_get_sb,
.mount = affs_mount,
.kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
};
Expand Down
11 changes: 5 additions & 6 deletions fs/befs/linuxvfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -913,18 +913,17 @@ befs_statfs(struct dentry *dentry, struct kstatfs *buf)
return 0;
}

static int
befs_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name,
void *data, struct vfsmount *mnt)
static struct dentry *
befs_mount(struct file_system_type *fs_type, int flags, const char *dev_name,
void *data)
{
return get_sb_bdev(fs_type, flags, dev_name, data, befs_fill_super,
mnt);
return mount_bdev(fs_type, flags, dev_name, data, befs_fill_super);
}

static struct file_system_type befs_fs_type = {
.owner = THIS_MODULE,
.name = "befs",
.get_sb = befs_get_sb,
.mount = befs_mount,
.kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
};
Expand Down
8 changes: 4 additions & 4 deletions fs/bfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,16 +450,16 @@ static int bfs_fill_super(struct super_block *s, void *data, int silent)
return ret;
}

static int bfs_get_sb(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data, struct vfsmount *mnt)
static struct dentry *bfs_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
return get_sb_bdev(fs_type, flags, dev_name, data, bfs_fill_super, mnt);
return mount_bdev(fs_type, flags, dev_name, data, bfs_fill_super);
}

static struct file_system_type bfs_fs_type = {
.owner = THIS_MODULE,
.name = "bfs",
.get_sb = bfs_get_sb,
.mount = bfs_mount,
.kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
};
Expand Down
9 changes: 4 additions & 5 deletions fs/cramfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,17 +533,16 @@ static const struct super_operations cramfs_ops = {
.statfs = cramfs_statfs,
};

static int cramfs_get_sb(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data, struct vfsmount *mnt)
static struct dentry *cramfs_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
return get_sb_bdev(fs_type, flags, dev_name, data, cramfs_fill_super,
mnt);
return mount_bdev(fs_type, flags, dev_name, data, cramfs_fill_super);
}

static struct file_system_type cramfs_fs_type = {
.owner = THIS_MODULE,
.name = "cramfs",
.get_sb = cramfs_get_sb,
.mount = cramfs_mount,
.kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
};
Expand Down
8 changes: 4 additions & 4 deletions fs/efs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@
static int efs_statfs(struct dentry *dentry, struct kstatfs *buf);
static int efs_fill_super(struct super_block *s, void *d, int silent);

static int efs_get_sb(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data, struct vfsmount *mnt)
static struct dentry *efs_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
return get_sb_bdev(fs_type, flags, dev_name, data, efs_fill_super, mnt);
return mount_bdev(fs_type, flags, dev_name, data, efs_fill_super);
}

static struct file_system_type efs_fs_type = {
.owner = THIS_MODULE,
.name = "efs",
.get_sb = efs_get_sb,
.mount = efs_mount,
.kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
};
Expand Down
8 changes: 4 additions & 4 deletions fs/ext2/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1356,10 +1356,10 @@ static int ext2_statfs (struct dentry * dentry, struct kstatfs * buf)
return 0;
}

static int ext2_get_sb(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data, struct vfsmount *mnt)
static struct dentry *ext2_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
return get_sb_bdev(fs_type, flags, dev_name, data, ext2_fill_super, mnt);
return mount_bdev(fs_type, flags, dev_name, data, ext2_fill_super);
}

#ifdef CONFIG_QUOTA
Expand Down Expand Up @@ -1473,7 +1473,7 @@ static ssize_t ext2_quota_write(struct super_block *sb, int type,
static struct file_system_type ext2_fs_type = {
.owner = THIS_MODULE,
.name = "ext2",
.get_sb = ext2_get_sb,
.mount = ext2_mount,
.kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
};
Expand Down
8 changes: 4 additions & 4 deletions fs/ext3/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -3020,16 +3020,16 @@ static ssize_t ext3_quota_write(struct super_block *sb, int type,

#endif

static int ext3_get_sb(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data, struct vfsmount *mnt)
static struct dentry *ext3_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
return get_sb_bdev(fs_type, flags, dev_name, data, ext3_fill_super, mnt);
return mount_bdev(fs_type, flags, dev_name, data, ext3_fill_super);
}

static struct file_system_type ext3_fs_type = {
.owner = THIS_MODULE,
.name = "ext3",
.get_sb = ext3_get_sb,
.mount = ext3_mount,
.kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
};
Expand Down
16 changes: 8 additions & 8 deletions fs/ext4/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,16 @@ static int ext4_statfs(struct dentry *dentry, struct kstatfs *buf);
static int ext4_unfreeze(struct super_block *sb);
static void ext4_write_super(struct super_block *sb);
static int ext4_freeze(struct super_block *sb);
static int ext4_get_sb(struct file_system_type *fs_type, int flags,
const char *dev_name, void *data, struct vfsmount *mnt);
static struct dentry *ext4_mount(struct file_system_type *fs_type, int flags,
const char *dev_name, void *data);
static void ext4_destroy_lazyinit_thread(void);
static void ext4_unregister_li_request(struct super_block *sb);

#if !defined(CONFIG_EXT3_FS) && !defined(CONFIG_EXT3_FS_MODULE) && defined(CONFIG_EXT4_USE_FOR_EXT23)
static struct file_system_type ext3_fs_type = {
.owner = THIS_MODULE,
.name = "ext3",
.get_sb = ext4_get_sb,
.mount = ext4_mount,
.kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
};
Expand Down Expand Up @@ -4667,17 +4667,17 @@ static ssize_t ext4_quota_write(struct super_block *sb, int type,

#endif

static int ext4_get_sb(struct file_system_type *fs_type, int flags,
const char *dev_name, void *data, struct vfsmount *mnt)
static struct dentry *ext4_mount(struct file_system_type *fs_type, int flags,
const char *dev_name, void *data)
{
return get_sb_bdev(fs_type, flags, dev_name, data, ext4_fill_super,mnt);
return mount_bdev(fs_type, flags, dev_name, data, ext4_fill_super);
}

#if !defined(CONFIG_EXT2_FS) && !defined(CONFIG_EXT2_FS_MODULE) && defined(CONFIG_EXT4_USE_FOR_EXT23)
static struct file_system_type ext2_fs_type = {
.owner = THIS_MODULE,
.name = "ext2",
.get_sb = ext4_get_sb,
.mount = ext4_mount,
.kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
};
Expand Down Expand Up @@ -4722,7 +4722,7 @@ static inline void unregister_as_ext3(void) { }
static struct file_system_type ext4_fs_type = {
.owner = THIS_MODULE,
.name = "ext4",
.get_sb = ext4_get_sb,
.mount = ext4_mount,
.kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
};
Expand Down
9 changes: 4 additions & 5 deletions fs/fat/namei_msdos.c
Original file line number Diff line number Diff line change
Expand Up @@ -675,18 +675,17 @@ static int msdos_fill_super(struct super_block *sb, void *data, int silent)
return 0;
}

static int msdos_get_sb(struct file_system_type *fs_type,
static struct dentry *msdos_mount(struct file_system_type *fs_type,
int flags, const char *dev_name,
void *data, struct vfsmount *mnt)
void *data)
{
return get_sb_bdev(fs_type, flags, dev_name, data, msdos_fill_super,
mnt);
return mount_bdev(fs_type, flags, dev_name, data, msdos_fill_super);
}

static struct file_system_type msdos_fs_type = {
.owner = THIS_MODULE,
.name = "msdos",
.get_sb = msdos_get_sb,
.mount = msdos_mount,
.kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
};
Expand Down
9 changes: 4 additions & 5 deletions fs/fat/namei_vfat.c
Original file line number Diff line number Diff line change
Expand Up @@ -1071,18 +1071,17 @@ static int vfat_fill_super(struct super_block *sb, void *data, int silent)
return 0;
}

static int vfat_get_sb(struct file_system_type *fs_type,
static struct dentry *vfat_mount(struct file_system_type *fs_type,
int flags, const char *dev_name,
void *data, struct vfsmount *mnt)
void *data)
{
return get_sb_bdev(fs_type, flags, dev_name, data, vfat_fill_super,
mnt);
return mount_bdev(fs_type, flags, dev_name, data, vfat_fill_super);
}

static struct file_system_type vfat_fs_type = {
.owner = THIS_MODULE,
.name = "vfat",
.get_sb = vfat_get_sb,
.mount = vfat_mount,
.kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
};
Expand Down
9 changes: 4 additions & 5 deletions fs/freevxfs/vxfs_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,17 +246,16 @@ static int vxfs_fill_super(struct super_block *sbp, void *dp, int silent)
/*
* The usual module blurb.
*/
static int vxfs_get_sb(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data, struct vfsmount *mnt)
static struct dentry *vxfs_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
return get_sb_bdev(fs_type, flags, dev_name, data, vxfs_fill_super,
mnt);
return mount_bdev(fs_type, flags, dev_name, data, vxfs_fill_super);
}

static struct file_system_type vxfs_fs_type = {
.owner = THIS_MODULE,
.name = "vxfs",
.get_sb = vxfs_get_sb,
.mount = vxfs_mount,
.kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
};
Expand Down
9 changes: 4 additions & 5 deletions fs/fuse/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1070,12 +1070,11 @@ static struct file_system_type fuse_fs_type = {
};

#ifdef CONFIG_BLOCK
static int fuse_get_sb_blk(struct file_system_type *fs_type,
static struct dentry *fuse_mount_blk(struct file_system_type *fs_type,
int flags, const char *dev_name,
void *raw_data, struct vfsmount *mnt)
void *raw_data)
{
return get_sb_bdev(fs_type, flags, dev_name, raw_data, fuse_fill_super,
mnt);
return mount_bdev(fs_type, flags, dev_name, raw_data, fuse_fill_super);
}

static void fuse_kill_sb_blk(struct super_block *sb)
Expand All @@ -1094,7 +1093,7 @@ static void fuse_kill_sb_blk(struct super_block *sb)
static struct file_system_type fuseblk_fs_type = {
.owner = THIS_MODULE,
.name = "fuseblk",
.get_sb = fuse_get_sb_blk,
.mount = fuse_mount_blk,
.kill_sb = fuse_kill_sb_blk,
.fs_flags = FS_REQUIRES_DEV | FS_HAS_SUBTYPE,
};
Expand Down
9 changes: 4 additions & 5 deletions fs/hfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,17 +441,16 @@ static int hfs_fill_super(struct super_block *sb, void *data, int silent)
return res;
}

static int hfs_get_sb(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data,
struct vfsmount *mnt)
static struct dentry *hfs_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
return get_sb_bdev(fs_type, flags, dev_name, data, hfs_fill_super, mnt);
return mount_bdev(fs_type, flags, dev_name, data, hfs_fill_super);
}

static struct file_system_type hfs_fs_type = {
.owner = THIS_MODULE,
.name = "hfs",
.get_sb = hfs_get_sb,
.mount = hfs_mount,
.kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
};
Expand Down
10 changes: 4 additions & 6 deletions fs/hfsplus/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -495,18 +495,16 @@ static void hfsplus_destroy_inode(struct inode *inode)

#define HFSPLUS_INODE_SIZE sizeof(struct hfsplus_inode_info)

static int hfsplus_get_sb(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data,
struct vfsmount *mnt)
static struct dentry *hfsplus_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
return get_sb_bdev(fs_type, flags, dev_name, data, hfsplus_fill_super,
mnt);
return mount_bdev(fs_type, flags, dev_name, data, hfsplus_fill_super);
}

static struct file_system_type hfsplus_fs_type = {
.owner = THIS_MODULE,
.name = "hfsplus",
.get_sb = hfsplus_get_sb,
.mount = hfsplus_mount,
.kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
};
Expand Down
9 changes: 4 additions & 5 deletions fs/hpfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -686,17 +686,16 @@ bail2: brelse(bh0);
return -EINVAL;
}

static int hpfs_get_sb(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data, struct vfsmount *mnt)
static struct dentry *hpfs_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
return get_sb_bdev(fs_type, flags, dev_name, data, hpfs_fill_super,
mnt);
return mount_bdev(fs_type, flags, dev_name, data, hpfs_fill_super);
}

static struct file_system_type hpfs_fs_type = {
.owner = THIS_MODULE,
.name = "hpfs",
.get_sb = hpfs_get_sb,
.mount = hpfs_mount,
.kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
};
Expand Down
Loading

0 comments on commit 152a083

Please sign in to comment.