You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
new helper: mount_bdev()
... and switch of the obvious get_sb_bdev() users to ->mount() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
+4
-5
@@ -490,17 +490,16 @@ error:
|
||||
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,
|
||||
};
|
||||
|
||||
+4
-5
@@ -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,
|
||||
};
|
||||
|
||||
+5
-6
@@ -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,
|
||||
};
|
||||
|
||||
+4
-4
@@ -450,16 +450,16 @@ out:
|
||||
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,
|
||||
};
|
||||
|
||||
+4
-5
@@ -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,
|
||||
};
|
||||
|
||||
+4
-4
@@ -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,
|
||||
};
|
||||
|
||||
+4
-4
@@ -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
|
||||
@@ -1473,7 +1473,7 @@ out:
|
||||
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,
|
||||
};
|
||||
|
||||
+4
-4
@@ -3020,16 +3020,16 @@ out:
|
||||
|
||||
#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,
|
||||
};
|
||||
|
||||
+8
-8
@@ -73,8 +73,8 @@ 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);
|
||||
|
||||
@@ -82,7 +82,7 @@ static void ext4_unregister_li_request(struct super_block *sb);
|
||||
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,
|
||||
};
|
||||
@@ -4667,17 +4667,17 @@ out:
|
||||
|
||||
#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,
|
||||
};
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
+4
-5
@@ -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,
|
||||
};
|
||||
|
||||
@@ -246,17 +246,16 @@ out:
|
||||
/*
|
||||
* 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,
|
||||
};
|
||||
|
||||
+4
-5
@@ -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)
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
+4
-5
@@ -441,17 +441,16 @@ bail:
|
||||
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,
|
||||
};
|
||||
|
||||
+4
-6
@@ -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,
|
||||
};
|
||||
|
||||
+4
-5
@@ -686,17 +686,16 @@ bail0:
|
||||
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,
|
||||
};
|
||||
|
||||
+4
-5
@@ -1507,17 +1507,16 @@ struct inode *isofs_iget(struct super_block *sb,
|
||||
return inode;
|
||||
}
|
||||
|
||||
static int isofs_get_sb(struct file_system_type *fs_type,
|
||||
int flags, const char *dev_name, void *data, struct vfsmount *mnt)
|
||||
static struct dentry *isofs_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, isofs_fill_super,
|
||||
mnt);
|
||||
return mount_bdev(fs_type, flags, dev_name, data, isofs_fill_super);
|
||||
}
|
||||
|
||||
static struct file_system_type iso9660_fs_type = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "iso9660",
|
||||
.get_sb = isofs_get_sb,
|
||||
.mount = isofs_mount,
|
||||
.kill_sb = kill_block_super,
|
||||
.fs_flags = FS_REQUIRES_DEV,
|
||||
};
|
||||
|
||||
+4
-5
@@ -583,11 +583,10 @@ static int jfs_unfreeze(struct super_block *sb)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int jfs_get_sb(struct file_system_type *fs_type,
|
||||
int flags, const char *dev_name, void *data, struct vfsmount *mnt)
|
||||
static struct dentry *jfs_do_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, jfs_fill_super,
|
||||
mnt);
|
||||
return mount_bdev(fs_type, flags, dev_name, data, jfs_fill_super);
|
||||
}
|
||||
|
||||
static int jfs_sync_fs(struct super_block *sb, int wait)
|
||||
@@ -770,7 +769,7 @@ static const struct export_operations jfs_export_operations = {
|
||||
static struct file_system_type jfs_fs_type = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "jfs",
|
||||
.get_sb = jfs_get_sb,
|
||||
.mount = jfs_do_mount,
|
||||
.kill_sb = kill_block_super,
|
||||
.fs_flags = FS_REQUIRES_DEV,
|
||||
};
|
||||
|
||||
+4
-5
@@ -614,17 +614,16 @@ void minix_truncate(struct inode * inode)
|
||||
V2_minix_truncate(inode);
|
||||
}
|
||||
|
||||
static int minix_get_sb(struct file_system_type *fs_type,
|
||||
int flags, const char *dev_name, void *data, struct vfsmount *mnt)
|
||||
static struct dentry *minix_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, minix_fill_super,
|
||||
mnt);
|
||||
return mount_bdev(fs_type, flags, dev_name, data, minix_fill_super);
|
||||
}
|
||||
|
||||
static struct file_system_type minix_fs_type = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "minix",
|
||||
.get_sb = minix_get_sb,
|
||||
.mount = minix_mount,
|
||||
.kill_sb = kill_block_super,
|
||||
.fs_flags = FS_REQUIRES_DEV,
|
||||
};
|
||||
|
||||
+4
-5
@@ -3059,17 +3059,16 @@ struct kmem_cache *ntfs_index_ctx_cache;
|
||||
/* Driver wide mutex. */
|
||||
DEFINE_MUTEX(ntfs_lock);
|
||||
|
||||
static int ntfs_get_sb(struct file_system_type *fs_type,
|
||||
int flags, const char *dev_name, void *data, struct vfsmount *mnt)
|
||||
static struct dentry *ntfs_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, ntfs_fill_super,
|
||||
mnt);
|
||||
return mount_bdev(fs_type, flags, dev_name, data, ntfs_fill_super);
|
||||
}
|
||||
|
||||
static struct file_system_type ntfs_fs_type = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "ntfs",
|
||||
.get_sb = ntfs_get_sb,
|
||||
.mount = ntfs_mount,
|
||||
.kill_sb = kill_block_super,
|
||||
.fs_flags = FS_REQUIRES_DEV,
|
||||
};
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user