diff options
-rw-r--r-- | fs/adfs/super.c | 9 | ||||
-rw-r--r-- | fs/affs/super.c | 9 | ||||
-rw-r--r-- | fs/befs/linuxvfs.c | 11 | ||||
-rw-r--r-- | fs/bfs/inode.c | 8 | ||||
-rw-r--r-- | fs/cramfs/inode.c | 9 | ||||
-rw-r--r-- | fs/efs/super.c | 8 | ||||
-rw-r--r-- | fs/ext2/super.c | 8 | ||||
-rw-r--r-- | fs/ext3/super.c | 8 | ||||
-rw-r--r-- | fs/ext4/super.c | 16 | ||||
-rw-r--r-- | fs/fat/namei_msdos.c | 9 | ||||
-rw-r--r-- | fs/fat/namei_vfat.c | 9 | ||||
-rw-r--r-- | fs/freevxfs/vxfs_super.c | 9 | ||||
-rw-r--r-- | fs/fuse/inode.c | 9 | ||||
-rw-r--r-- | fs/hfs/super.c | 9 | ||||
-rw-r--r-- | fs/hfsplus/super.c | 10 | ||||
-rw-r--r-- | fs/hpfs/super.c | 9 | ||||
-rw-r--r-- | fs/isofs/inode.c | 9 | ||||
-rw-r--r-- | fs/jfs/super.c | 9 | ||||
-rw-r--r-- | fs/minix/inode.c | 9 | ||||
-rw-r--r-- | fs/ntfs/super.c | 9 | ||||
-rw-r--r-- | fs/ocfs2/super.c | 11 | ||||
-rw-r--r-- | fs/omfs/inode.c | 9 | ||||
-rw-r--r-- | fs/qnx4/inode.c | 9 | ||||
-rw-r--r-- | fs/reiserfs/super.c | 9 | ||||
-rw-r--r-- | fs/squashfs/super.c | 10 | ||||
-rw-r--r-- | fs/super.c | 28 | ||||
-rw-r--r-- | fs/sysv/super.c | 17 | ||||
-rw-r--r-- | fs/udf/super.c | 9 | ||||
-rw-r--r-- | fs/ufs/super.c | 8 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_super.c | 12 | ||||
-rw-r--r-- | include/linux/fs.h | 3 |
31 files changed, 150 insertions, 161 deletions
diff --git a/fs/adfs/super.c b/fs/adfs/super.c index d9803f73236f..959dbff2d42d 100644 --- a/fs/adfs/super.c +++ b/fs/adfs/super.c | |||
@@ -490,17 +490,16 @@ error: | |||
490 | return -EINVAL; | 490 | return -EINVAL; |
491 | } | 491 | } |
492 | 492 | ||
493 | static int adfs_get_sb(struct file_system_type *fs_type, | 493 | static struct dentry *adfs_mount(struct file_system_type *fs_type, |
494 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 494 | int flags, const char *dev_name, void *data) |
495 | { | 495 | { |
496 | return get_sb_bdev(fs_type, flags, dev_name, data, adfs_fill_super, | 496 | return mount_bdev(fs_type, flags, dev_name, data, adfs_fill_super); |
497 | mnt); | ||
498 | } | 497 | } |
499 | 498 | ||
500 | static struct file_system_type adfs_fs_type = { | 499 | static struct file_system_type adfs_fs_type = { |
501 | .owner = THIS_MODULE, | 500 | .owner = THIS_MODULE, |
502 | .name = "adfs", | 501 | .name = "adfs", |
503 | .get_sb = adfs_get_sb, | 502 | .mount = adfs_mount, |
504 | .kill_sb = kill_block_super, | 503 | .kill_sb = kill_block_super, |
505 | .fs_flags = FS_REQUIRES_DEV, | 504 | .fs_flags = FS_REQUIRES_DEV, |
506 | }; | 505 | }; |
diff --git a/fs/affs/super.c b/fs/affs/super.c index fa4fbe1e238a..0cf7f4384cbd 100644 --- a/fs/affs/super.c +++ b/fs/affs/super.c | |||
@@ -573,17 +573,16 @@ affs_statfs(struct dentry *dentry, struct kstatfs *buf) | |||
573 | return 0; | 573 | return 0; |
574 | } | 574 | } |
575 | 575 | ||
576 | static int affs_get_sb(struct file_system_type *fs_type, | 576 | static struct dentry *affs_mount(struct file_system_type *fs_type, |
577 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 577 | int flags, const char *dev_name, void *data) |
578 | { | 578 | { |
579 | return get_sb_bdev(fs_type, flags, dev_name, data, affs_fill_super, | 579 | return mount_bdev(fs_type, flags, dev_name, data, affs_fill_super); |
580 | mnt); | ||
581 | } | 580 | } |
582 | 581 | ||
583 | static struct file_system_type affs_fs_type = { | 582 | static struct file_system_type affs_fs_type = { |
584 | .owner = THIS_MODULE, | 583 | .owner = THIS_MODULE, |
585 | .name = "affs", | 584 | .name = "affs", |
586 | .get_sb = affs_get_sb, | 585 | .mount = affs_mount, |
587 | .kill_sb = kill_block_super, | 586 | .kill_sb = kill_block_super, |
588 | .fs_flags = FS_REQUIRES_DEV, | 587 | .fs_flags = FS_REQUIRES_DEV, |
589 | }; | 588 | }; |
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index dc39d2824885..aa4e7c7ae3c6 100644 --- a/fs/befs/linuxvfs.c +++ b/fs/befs/linuxvfs.c | |||
@@ -913,18 +913,17 @@ befs_statfs(struct dentry *dentry, struct kstatfs *buf) | |||
913 | return 0; | 913 | return 0; |
914 | } | 914 | } |
915 | 915 | ||
916 | static int | 916 | static struct dentry * |
917 | befs_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name, | 917 | befs_mount(struct file_system_type *fs_type, int flags, const char *dev_name, |
918 | void *data, struct vfsmount *mnt) | 918 | void *data) |
919 | { | 919 | { |
920 | return get_sb_bdev(fs_type, flags, dev_name, data, befs_fill_super, | 920 | return mount_bdev(fs_type, flags, dev_name, data, befs_fill_super); |
921 | mnt); | ||
922 | } | 921 | } |
923 | 922 | ||
924 | static struct file_system_type befs_fs_type = { | 923 | static struct file_system_type befs_fs_type = { |
925 | .owner = THIS_MODULE, | 924 | .owner = THIS_MODULE, |
926 | .name = "befs", | 925 | .name = "befs", |
927 | .get_sb = befs_get_sb, | 926 | .mount = befs_mount, |
928 | .kill_sb = kill_block_super, | 927 | .kill_sb = kill_block_super, |
929 | .fs_flags = FS_REQUIRES_DEV, | 928 | .fs_flags = FS_REQUIRES_DEV, |
930 | }; | 929 | }; |
diff --git a/fs/bfs/inode.c b/fs/bfs/inode.c index 883e77acd5a8..76db6d7d49bb 100644 --- a/fs/bfs/inode.c +++ b/fs/bfs/inode.c | |||
@@ -450,16 +450,16 @@ out: | |||
450 | return ret; | 450 | return ret; |
451 | } | 451 | } |
452 | 452 | ||
453 | static int bfs_get_sb(struct file_system_type *fs_type, | 453 | static struct dentry *bfs_mount(struct file_system_type *fs_type, |
454 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 454 | int flags, const char *dev_name, void *data) |
455 | { | 455 | { |
456 | return get_sb_bdev(fs_type, flags, dev_name, data, bfs_fill_super, mnt); | 456 | return mount_bdev(fs_type, flags, dev_name, data, bfs_fill_super); |
457 | } | 457 | } |
458 | 458 | ||
459 | static struct file_system_type bfs_fs_type = { | 459 | static struct file_system_type bfs_fs_type = { |
460 | .owner = THIS_MODULE, | 460 | .owner = THIS_MODULE, |
461 | .name = "bfs", | 461 | .name = "bfs", |
462 | .get_sb = bfs_get_sb, | 462 | .mount = bfs_mount, |
463 | .kill_sb = kill_block_super, | 463 | .kill_sb = kill_block_super, |
464 | .fs_flags = FS_REQUIRES_DEV, | 464 | .fs_flags = FS_REQUIRES_DEV, |
465 | }; | 465 | }; |
diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c index 1e7a33028d33..32fd5fe9ca0e 100644 --- a/fs/cramfs/inode.c +++ b/fs/cramfs/inode.c | |||
@@ -533,17 +533,16 @@ static const struct super_operations cramfs_ops = { | |||
533 | .statfs = cramfs_statfs, | 533 | .statfs = cramfs_statfs, |
534 | }; | 534 | }; |
535 | 535 | ||
536 | static int cramfs_get_sb(struct file_system_type *fs_type, | 536 | static struct dentry *cramfs_mount(struct file_system_type *fs_type, |
537 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 537 | int flags, const char *dev_name, void *data) |
538 | { | 538 | { |
539 | return get_sb_bdev(fs_type, flags, dev_name, data, cramfs_fill_super, | 539 | return mount_bdev(fs_type, flags, dev_name, data, cramfs_fill_super); |
540 | mnt); | ||
541 | } | 540 | } |
542 | 541 | ||
543 | static struct file_system_type cramfs_fs_type = { | 542 | static struct file_system_type cramfs_fs_type = { |
544 | .owner = THIS_MODULE, | 543 | .owner = THIS_MODULE, |
545 | .name = "cramfs", | 544 | .name = "cramfs", |
546 | .get_sb = cramfs_get_sb, | 545 | .mount = cramfs_mount, |
547 | .kill_sb = kill_block_super, | 546 | .kill_sb = kill_block_super, |
548 | .fs_flags = FS_REQUIRES_DEV, | 547 | .fs_flags = FS_REQUIRES_DEV, |
549 | }; | 548 | }; |
diff --git a/fs/efs/super.c b/fs/efs/super.c index f04942810818..5073a07652cc 100644 --- a/fs/efs/super.c +++ b/fs/efs/super.c | |||
@@ -20,16 +20,16 @@ | |||
20 | static int efs_statfs(struct dentry *dentry, struct kstatfs *buf); | 20 | static int efs_statfs(struct dentry *dentry, struct kstatfs *buf); |
21 | static int efs_fill_super(struct super_block *s, void *d, int silent); | 21 | static int efs_fill_super(struct super_block *s, void *d, int silent); |
22 | 22 | ||
23 | static int efs_get_sb(struct file_system_type *fs_type, | 23 | static struct dentry *efs_mount(struct file_system_type *fs_type, |
24 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 24 | int flags, const char *dev_name, void *data) |
25 | { | 25 | { |
26 | return get_sb_bdev(fs_type, flags, dev_name, data, efs_fill_super, mnt); | 26 | return mount_bdev(fs_type, flags, dev_name, data, efs_fill_super); |
27 | } | 27 | } |
28 | 28 | ||
29 | static struct file_system_type efs_fs_type = { | 29 | static struct file_system_type efs_fs_type = { |
30 | .owner = THIS_MODULE, | 30 | .owner = THIS_MODULE, |
31 | .name = "efs", | 31 | .name = "efs", |
32 | .get_sb = efs_get_sb, | 32 | .mount = efs_mount, |
33 | .kill_sb = kill_block_super, | 33 | .kill_sb = kill_block_super, |
34 | .fs_flags = FS_REQUIRES_DEV, | 34 | .fs_flags = FS_REQUIRES_DEV, |
35 | }; | 35 | }; |
diff --git a/fs/ext2/super.c b/fs/ext2/super.c index 0901320671da..d89e0b6a2d78 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c | |||
@@ -1356,10 +1356,10 @@ static int ext2_statfs (struct dentry * dentry, struct kstatfs * buf) | |||
1356 | return 0; | 1356 | return 0; |
1357 | } | 1357 | } |
1358 | 1358 | ||
1359 | static int ext2_get_sb(struct file_system_type *fs_type, | 1359 | static struct dentry *ext2_mount(struct file_system_type *fs_type, |
1360 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 1360 | int flags, const char *dev_name, void *data) |
1361 | { | 1361 | { |
1362 | return get_sb_bdev(fs_type, flags, dev_name, data, ext2_fill_super, mnt); | 1362 | return mount_bdev(fs_type, flags, dev_name, data, ext2_fill_super); |
1363 | } | 1363 | } |
1364 | 1364 | ||
1365 | #ifdef CONFIG_QUOTA | 1365 | #ifdef CONFIG_QUOTA |
@@ -1473,7 +1473,7 @@ out: | |||
1473 | static struct file_system_type ext2_fs_type = { | 1473 | static struct file_system_type ext2_fs_type = { |
1474 | .owner = THIS_MODULE, | 1474 | .owner = THIS_MODULE, |
1475 | .name = "ext2", | 1475 | .name = "ext2", |
1476 | .get_sb = ext2_get_sb, | 1476 | .mount = ext2_mount, |
1477 | .kill_sb = kill_block_super, | 1477 | .kill_sb = kill_block_super, |
1478 | .fs_flags = FS_REQUIRES_DEV, | 1478 | .fs_flags = FS_REQUIRES_DEV, |
1479 | }; | 1479 | }; |
diff --git a/fs/ext3/super.c b/fs/ext3/super.c index db87413d3479..2fedaf8b5012 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c | |||
@@ -3020,16 +3020,16 @@ out: | |||
3020 | 3020 | ||
3021 | #endif | 3021 | #endif |
3022 | 3022 | ||
3023 | static int ext3_get_sb(struct file_system_type *fs_type, | 3023 | static struct dentry *ext3_mount(struct file_system_type *fs_type, |
3024 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 3024 | int flags, const char *dev_name, void *data) |
3025 | { | 3025 | { |
3026 | return get_sb_bdev(fs_type, flags, dev_name, data, ext3_fill_super, mnt); | 3026 | return mount_bdev(fs_type, flags, dev_name, data, ext3_fill_super); |
3027 | } | 3027 | } |
3028 | 3028 | ||
3029 | static struct file_system_type ext3_fs_type = { | 3029 | static struct file_system_type ext3_fs_type = { |
3030 | .owner = THIS_MODULE, | 3030 | .owner = THIS_MODULE, |
3031 | .name = "ext3", | 3031 | .name = "ext3", |
3032 | .get_sb = ext3_get_sb, | 3032 | .mount = ext3_mount, |
3033 | .kill_sb = kill_block_super, | 3033 | .kill_sb = kill_block_super, |
3034 | .fs_flags = FS_REQUIRES_DEV, | 3034 | .fs_flags = FS_REQUIRES_DEV, |
3035 | }; | 3035 | }; |
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 0348ce066592..40131b777af6 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -73,8 +73,8 @@ static int ext4_statfs(struct dentry *dentry, struct kstatfs *buf); | |||
73 | static int ext4_unfreeze(struct super_block *sb); | 73 | static int ext4_unfreeze(struct super_block *sb); |
74 | static void ext4_write_super(struct super_block *sb); | 74 | static void ext4_write_super(struct super_block *sb); |
75 | static int ext4_freeze(struct super_block *sb); | 75 | static int ext4_freeze(struct super_block *sb); |
76 | static int ext4_get_sb(struct file_system_type *fs_type, int flags, | 76 | static struct dentry *ext4_mount(struct file_system_type *fs_type, int flags, |
77 | const char *dev_name, void *data, struct vfsmount *mnt); | 77 | const char *dev_name, void *data); |
78 | static void ext4_destroy_lazyinit_thread(void); | 78 | static void ext4_destroy_lazyinit_thread(void); |
79 | static void ext4_unregister_li_request(struct super_block *sb); | 79 | static void ext4_unregister_li_request(struct super_block *sb); |
80 | 80 | ||
@@ -82,7 +82,7 @@ static void ext4_unregister_li_request(struct super_block *sb); | |||
82 | static struct file_system_type ext3_fs_type = { | 82 | static struct file_system_type ext3_fs_type = { |
83 | .owner = THIS_MODULE, | 83 | .owner = THIS_MODULE, |
84 | .name = "ext3", | 84 | .name = "ext3", |
85 | .get_sb = ext4_get_sb, | 85 | .mount = ext4_mount, |
86 | .kill_sb = kill_block_super, | 86 | .kill_sb = kill_block_super, |
87 | .fs_flags = FS_REQUIRES_DEV, | 87 | .fs_flags = FS_REQUIRES_DEV, |
88 | }; | 88 | }; |
@@ -4667,17 +4667,17 @@ out: | |||
4667 | 4667 | ||
4668 | #endif | 4668 | #endif |
4669 | 4669 | ||
4670 | static int ext4_get_sb(struct file_system_type *fs_type, int flags, | 4670 | static struct dentry *ext4_mount(struct file_system_type *fs_type, int flags, |
4671 | const char *dev_name, void *data, struct vfsmount *mnt) | 4671 | const char *dev_name, void *data) |
4672 | { | 4672 | { |
4673 | return get_sb_bdev(fs_type, flags, dev_name, data, ext4_fill_super,mnt); | 4673 | return mount_bdev(fs_type, flags, dev_name, data, ext4_fill_super); |
4674 | } | 4674 | } |
4675 | 4675 | ||
4676 | #if !defined(CONFIG_EXT2_FS) && !defined(CONFIG_EXT2_FS_MODULE) && defined(CONFIG_EXT4_USE_FOR_EXT23) | 4676 | #if !defined(CONFIG_EXT2_FS) && !defined(CONFIG_EXT2_FS_MODULE) && defined(CONFIG_EXT4_USE_FOR_EXT23) |
4677 | static struct file_system_type ext2_fs_type = { | 4677 | static struct file_system_type ext2_fs_type = { |
4678 | .owner = THIS_MODULE, | 4678 | .owner = THIS_MODULE, |
4679 | .name = "ext2", | 4679 | .name = "ext2", |
4680 | .get_sb = ext4_get_sb, | 4680 | .mount = ext4_mount, |
4681 | .kill_sb = kill_block_super, | 4681 | .kill_sb = kill_block_super, |
4682 | .fs_flags = FS_REQUIRES_DEV, | 4682 | .fs_flags = FS_REQUIRES_DEV, |
4683 | }; | 4683 | }; |
@@ -4722,7 +4722,7 @@ static inline void unregister_as_ext3(void) { } | |||
4722 | static struct file_system_type ext4_fs_type = { | 4722 | static struct file_system_type ext4_fs_type = { |
4723 | .owner = THIS_MODULE, | 4723 | .owner = THIS_MODULE, |
4724 | .name = "ext4", | 4724 | .name = "ext4", |
4725 | .get_sb = ext4_get_sb, | 4725 | .mount = ext4_mount, |
4726 | .kill_sb = kill_block_super, | 4726 | .kill_sb = kill_block_super, |
4727 | .fs_flags = FS_REQUIRES_DEV, | 4727 | .fs_flags = FS_REQUIRES_DEV, |
4728 | }; | 4728 | }; |
diff --git a/fs/fat/namei_msdos.c b/fs/fat/namei_msdos.c index bbca5c186ae7..3345aabd1dd7 100644 --- a/fs/fat/namei_msdos.c +++ b/fs/fat/namei_msdos.c | |||
@@ -675,18 +675,17 @@ static int msdos_fill_super(struct super_block *sb, void *data, int silent) | |||
675 | return 0; | 675 | return 0; |
676 | } | 676 | } |
677 | 677 | ||
678 | static int msdos_get_sb(struct file_system_type *fs_type, | 678 | static struct dentry *msdos_mount(struct file_system_type *fs_type, |
679 | int flags, const char *dev_name, | 679 | int flags, const char *dev_name, |
680 | void *data, struct vfsmount *mnt) | 680 | void *data) |
681 | { | 681 | { |
682 | return get_sb_bdev(fs_type, flags, dev_name, data, msdos_fill_super, | 682 | return mount_bdev(fs_type, flags, dev_name, data, msdos_fill_super); |
683 | mnt); | ||
684 | } | 683 | } |
685 | 684 | ||
686 | static struct file_system_type msdos_fs_type = { | 685 | static struct file_system_type msdos_fs_type = { |
687 | .owner = THIS_MODULE, | 686 | .owner = THIS_MODULE, |
688 | .name = "msdos", | 687 | .name = "msdos", |
689 | .get_sb = msdos_get_sb, | 688 | .mount = msdos_mount, |
690 | .kill_sb = kill_block_super, | 689 | .kill_sb = kill_block_super, |
691 | .fs_flags = FS_REQUIRES_DEV, | 690 | .fs_flags = FS_REQUIRES_DEV, |
692 | }; | 691 | }; |
diff --git a/fs/fat/namei_vfat.c b/fs/fat/namei_vfat.c index 6f0f6c9a0152..b936703b8924 100644 --- a/fs/fat/namei_vfat.c +++ b/fs/fat/namei_vfat.c | |||
@@ -1071,18 +1071,17 @@ static int vfat_fill_super(struct super_block *sb, void *data, int silent) | |||
1071 | return 0; | 1071 | return 0; |
1072 | } | 1072 | } |
1073 | 1073 | ||
1074 | static int vfat_get_sb(struct file_system_type *fs_type, | 1074 | static struct dentry *vfat_mount(struct file_system_type *fs_type, |
1075 | int flags, const char *dev_name, | 1075 | int flags, const char *dev_name, |
1076 | void *data, struct vfsmount *mnt) | 1076 | void *data) |
1077 | { | 1077 | { |
1078 | return get_sb_bdev(fs_type, flags, dev_name, data, vfat_fill_super, | 1078 | return mount_bdev(fs_type, flags, dev_name, data, vfat_fill_super); |
1079 | mnt); | ||
1080 | } | 1079 | } |
1081 | 1080 | ||
1082 | static struct file_system_type vfat_fs_type = { | 1081 | static struct file_system_type vfat_fs_type = { |
1083 | .owner = THIS_MODULE, | 1082 | .owner = THIS_MODULE, |
1084 | .name = "vfat", | 1083 | .name = "vfat", |
1085 | .get_sb = vfat_get_sb, | 1084 | .mount = vfat_mount, |
1086 | .kill_sb = kill_block_super, | 1085 | .kill_sb = kill_block_super, |
1087 | .fs_flags = FS_REQUIRES_DEV, | 1086 | .fs_flags = FS_REQUIRES_DEV, |
1088 | }; | 1087 | }; |
diff --git a/fs/freevxfs/vxfs_super.c b/fs/freevxfs/vxfs_super.c index 71b0148b8784..9d1c99558389 100644 --- a/fs/freevxfs/vxfs_super.c +++ b/fs/freevxfs/vxfs_super.c | |||
@@ -246,17 +246,16 @@ out: | |||
246 | /* | 246 | /* |
247 | * The usual module blurb. | 247 | * The usual module blurb. |
248 | */ | 248 | */ |
249 | static int vxfs_get_sb(struct file_system_type *fs_type, | 249 | static struct dentry *vxfs_mount(struct file_system_type *fs_type, |
250 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 250 | int flags, const char *dev_name, void *data) |
251 | { | 251 | { |
252 | return get_sb_bdev(fs_type, flags, dev_name, data, vxfs_fill_super, | 252 | return mount_bdev(fs_type, flags, dev_name, data, vxfs_fill_super); |
253 | mnt); | ||
254 | } | 253 | } |
255 | 254 | ||
256 | static struct file_system_type vxfs_fs_type = { | 255 | static struct file_system_type vxfs_fs_type = { |
257 | .owner = THIS_MODULE, | 256 | .owner = THIS_MODULE, |
258 | .name = "vxfs", | 257 | .name = "vxfs", |
259 | .get_sb = vxfs_get_sb, | 258 | .mount = vxfs_mount, |
260 | .kill_sb = kill_block_super, | 259 | .kill_sb = kill_block_super, |
261 | .fs_flags = FS_REQUIRES_DEV, | 260 | .fs_flags = FS_REQUIRES_DEV, |
262 | }; | 261 | }; |
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index da9e6e11374c..edf6a1843533 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c | |||
@@ -1070,12 +1070,11 @@ static struct file_system_type fuse_fs_type = { | |||
1070 | }; | 1070 | }; |
1071 | 1071 | ||
1072 | #ifdef CONFIG_BLOCK | 1072 | #ifdef CONFIG_BLOCK |
1073 | static int fuse_get_sb_blk(struct file_system_type *fs_type, | 1073 | static struct dentry *fuse_mount_blk(struct file_system_type *fs_type, |
1074 | int flags, const char *dev_name, | 1074 | int flags, const char *dev_name, |
1075 | void *raw_data, struct vfsmount *mnt) | 1075 | void *raw_data) |
1076 | { | 1076 | { |
1077 | return get_sb_bdev(fs_type, flags, dev_name, raw_data, fuse_fill_super, | 1077 | return mount_bdev(fs_type, flags, dev_name, raw_data, fuse_fill_super); |
1078 | mnt); | ||
1079 | } | 1078 | } |
1080 | 1079 | ||
1081 | static void fuse_kill_sb_blk(struct super_block *sb) | 1080 | static void fuse_kill_sb_blk(struct super_block *sb) |
@@ -1094,7 +1093,7 @@ static void fuse_kill_sb_blk(struct super_block *sb) | |||
1094 | static struct file_system_type fuseblk_fs_type = { | 1093 | static struct file_system_type fuseblk_fs_type = { |
1095 | .owner = THIS_MODULE, | 1094 | .owner = THIS_MODULE, |
1096 | .name = "fuseblk", | 1095 | .name = "fuseblk", |
1097 | .get_sb = fuse_get_sb_blk, | 1096 | .mount = fuse_mount_blk, |
1098 | .kill_sb = fuse_kill_sb_blk, | 1097 | .kill_sb = fuse_kill_sb_blk, |
1099 | .fs_flags = FS_REQUIRES_DEV | FS_HAS_SUBTYPE, | 1098 | .fs_flags = FS_REQUIRES_DEV | FS_HAS_SUBTYPE, |
1100 | }; | 1099 | }; |
diff --git a/fs/hfs/super.c b/fs/hfs/super.c index 6ee1586f2334..4824c27cebb8 100644 --- a/fs/hfs/super.c +++ b/fs/hfs/super.c | |||
@@ -441,17 +441,16 @@ bail: | |||
441 | return res; | 441 | return res; |
442 | } | 442 | } |
443 | 443 | ||
444 | static int hfs_get_sb(struct file_system_type *fs_type, | 444 | static struct dentry *hfs_mount(struct file_system_type *fs_type, |
445 | int flags, const char *dev_name, void *data, | 445 | int flags, const char *dev_name, void *data) |
446 | struct vfsmount *mnt) | ||
447 | { | 446 | { |
448 | return get_sb_bdev(fs_type, flags, dev_name, data, hfs_fill_super, mnt); | 447 | return mount_bdev(fs_type, flags, dev_name, data, hfs_fill_super); |
449 | } | 448 | } |
450 | 449 | ||
451 | static struct file_system_type hfs_fs_type = { | 450 | static struct file_system_type hfs_fs_type = { |
452 | .owner = THIS_MODULE, | 451 | .owner = THIS_MODULE, |
453 | .name = "hfs", | 452 | .name = "hfs", |
454 | .get_sb = hfs_get_sb, | 453 | .mount = hfs_mount, |
455 | .kill_sb = kill_block_super, | 454 | .kill_sb = kill_block_super, |
456 | .fs_flags = FS_REQUIRES_DEV, | 455 | .fs_flags = FS_REQUIRES_DEV, |
457 | }; | 456 | }; |
diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c index 9a88d7536103..52cc746d3ba3 100644 --- a/fs/hfsplus/super.c +++ b/fs/hfsplus/super.c | |||
@@ -495,18 +495,16 @@ static void hfsplus_destroy_inode(struct inode *inode) | |||
495 | 495 | ||
496 | #define HFSPLUS_INODE_SIZE sizeof(struct hfsplus_inode_info) | 496 | #define HFSPLUS_INODE_SIZE sizeof(struct hfsplus_inode_info) |
497 | 497 | ||
498 | static int hfsplus_get_sb(struct file_system_type *fs_type, | 498 | static struct dentry *hfsplus_mount(struct file_system_type *fs_type, |
499 | int flags, const char *dev_name, void *data, | 499 | int flags, const char *dev_name, void *data) |
500 | struct vfsmount *mnt) | ||
501 | { | 500 | { |
502 | return get_sb_bdev(fs_type, flags, dev_name, data, hfsplus_fill_super, | 501 | return mount_bdev(fs_type, flags, dev_name, data, hfsplus_fill_super); |
503 | mnt); | ||
504 | } | 502 | } |
505 | 503 | ||
506 | static struct file_system_type hfsplus_fs_type = { | 504 | static struct file_system_type hfsplus_fs_type = { |
507 | .owner = THIS_MODULE, | 505 | .owner = THIS_MODULE, |
508 | .name = "hfsplus", | 506 | .name = "hfsplus", |
509 | .get_sb = hfsplus_get_sb, | 507 | .mount = hfsplus_mount, |
510 | .kill_sb = kill_block_super, | 508 | .kill_sb = kill_block_super, |
511 | .fs_flags = FS_REQUIRES_DEV, | 509 | .fs_flags = FS_REQUIRES_DEV, |
512 | }; | 510 | }; |
diff --git a/fs/hpfs/super.c b/fs/hpfs/super.c index c969a1aa163a..bb69389972eb 100644 --- a/fs/hpfs/super.c +++ b/fs/hpfs/super.c | |||
@@ -686,17 +686,16 @@ bail0: | |||
686 | return -EINVAL; | 686 | return -EINVAL; |
687 | } | 687 | } |
688 | 688 | ||
689 | static int hpfs_get_sb(struct file_system_type *fs_type, | 689 | static struct dentry *hpfs_mount(struct file_system_type *fs_type, |
690 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 690 | int flags, const char *dev_name, void *data) |
691 | { | 691 | { |
692 | return get_sb_bdev(fs_type, flags, dev_name, data, hpfs_fill_super, | 692 | return mount_bdev(fs_type, flags, dev_name, data, hpfs_fill_super); |
693 | mnt); | ||
694 | } | 693 | } |
695 | 694 | ||
696 | static struct file_system_type hpfs_fs_type = { | 695 | static struct file_system_type hpfs_fs_type = { |
697 | .owner = THIS_MODULE, | 696 | .owner = THIS_MODULE, |
698 | .name = "hpfs", | 697 | .name = "hpfs", |
699 | .get_sb = hpfs_get_sb, | 698 | .mount = hpfs_mount, |
700 | .kill_sb = kill_block_super, | 699 | .kill_sb = kill_block_super, |
701 | .fs_flags = FS_REQUIRES_DEV, | 700 | .fs_flags = FS_REQUIRES_DEV, |
702 | }; | 701 | }; |
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c index 79cf7f616bbe..bfdeb82a53be 100644 --- a/fs/isofs/inode.c +++ b/fs/isofs/inode.c | |||
@@ -1507,17 +1507,16 @@ struct inode *isofs_iget(struct super_block *sb, | |||
1507 | return inode; | 1507 | return inode; |
1508 | } | 1508 | } |
1509 | 1509 | ||
1510 | static int isofs_get_sb(struct file_system_type *fs_type, | 1510 | static struct dentry *isofs_mount(struct file_system_type *fs_type, |
1511 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 1511 | int flags, const char *dev_name, void *data) |
1512 | { | 1512 | { |
1513 | return get_sb_bdev(fs_type, flags, dev_name, data, isofs_fill_super, | 1513 | return mount_bdev(fs_type, flags, dev_name, data, isofs_fill_super); |
1514 | mnt); | ||
1515 | } | 1514 | } |
1516 | 1515 | ||
1517 | static struct file_system_type iso9660_fs_type = { | 1516 | static struct file_system_type iso9660_fs_type = { |
1518 | .owner = THIS_MODULE, | 1517 | .owner = THIS_MODULE, |
1519 | .name = "iso9660", | 1518 | .name = "iso9660", |
1520 | .get_sb = isofs_get_sb, | 1519 | .mount = isofs_mount, |
1521 | .kill_sb = kill_block_super, | 1520 | .kill_sb = kill_block_super, |
1522 | .fs_flags = FS_REQUIRES_DEV, | 1521 | .fs_flags = FS_REQUIRES_DEV, |
1523 | }; | 1522 | }; |
diff --git a/fs/jfs/super.c b/fs/jfs/super.c index 68eee2bf629e..0669fc1cc3bf 100644 --- a/fs/jfs/super.c +++ b/fs/jfs/super.c | |||
@@ -583,11 +583,10 @@ static int jfs_unfreeze(struct super_block *sb) | |||
583 | return 0; | 583 | return 0; |
584 | } | 584 | } |
585 | 585 | ||
586 | static int jfs_get_sb(struct file_system_type *fs_type, | 586 | static struct dentry *jfs_do_mount(struct file_system_type *fs_type, |
587 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 587 | int flags, const char *dev_name, void *data) |
588 | { | 588 | { |
589 | return get_sb_bdev(fs_type, flags, dev_name, data, jfs_fill_super, | 589 | return mount_bdev(fs_type, flags, dev_name, data, jfs_fill_super); |
590 | mnt); | ||
591 | } | 590 | } |
592 | 591 | ||
593 | static int jfs_sync_fs(struct super_block *sb, int wait) | 592 | static int jfs_sync_fs(struct super_block *sb, int wait) |
@@ -770,7 +769,7 @@ static const struct export_operations jfs_export_operations = { | |||
770 | static struct file_system_type jfs_fs_type = { | 769 | static struct file_system_type jfs_fs_type = { |
771 | .owner = THIS_MODULE, | 770 | .owner = THIS_MODULE, |
772 | .name = "jfs", | 771 | .name = "jfs", |
773 | .get_sb = jfs_get_sb, | 772 | .mount = jfs_do_mount, |
774 | .kill_sb = kill_block_super, | 773 | .kill_sb = kill_block_super, |
775 | .fs_flags = FS_REQUIRES_DEV, | 774 | .fs_flags = FS_REQUIRES_DEV, |
776 | }; | 775 | }; |
diff --git a/fs/minix/inode.c b/fs/minix/inode.c index e39d6bf2e8fb..fb2020858a34 100644 --- a/fs/minix/inode.c +++ b/fs/minix/inode.c | |||
@@ -614,17 +614,16 @@ void minix_truncate(struct inode * inode) | |||
614 | V2_minix_truncate(inode); | 614 | V2_minix_truncate(inode); |
615 | } | 615 | } |
616 | 616 | ||
617 | static int minix_get_sb(struct file_system_type *fs_type, | 617 | static struct dentry *minix_mount(struct file_system_type *fs_type, |
618 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 618 | int flags, const char *dev_name, void *data) |
619 | { | 619 | { |
620 | return get_sb_bdev(fs_type, flags, dev_name, data, minix_fill_super, | 620 | return mount_bdev(fs_type, flags, dev_name, data, minix_fill_super); |
621 | mnt); | ||
622 | } | 621 | } |
623 | 622 | ||
624 | static struct file_system_type minix_fs_type = { | 623 | static struct file_system_type minix_fs_type = { |
625 | .owner = THIS_MODULE, | 624 | .owner = THIS_MODULE, |
626 | .name = "minix", | 625 | .name = "minix", |
627 | .get_sb = minix_get_sb, | 626 | .mount = minix_mount, |
628 | .kill_sb = kill_block_super, | 627 | .kill_sb = kill_block_super, |
629 | .fs_flags = FS_REQUIRES_DEV, | 628 | .fs_flags = FS_REQUIRES_DEV, |
630 | }; | 629 | }; |
diff --git a/fs/ntfs/super.c b/fs/ntfs/super.c index d3fbe5730bfc..a30ecacc01f2 100644 --- a/fs/ntfs/super.c +++ b/fs/ntfs/super.c | |||
@@ -3059,17 +3059,16 @@ struct kmem_cache *ntfs_index_ctx_cache; | |||
3059 | /* Driver wide mutex. */ | 3059 | /* Driver wide mutex. */ |
3060 | DEFINE_MUTEX(ntfs_lock); | 3060 | DEFINE_MUTEX(ntfs_lock); |
3061 | 3061 | ||
3062 | static int ntfs_get_sb(struct file_system_type *fs_type, | 3062 | static struct dentry *ntfs_mount(struct file_system_type *fs_type, |
3063 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 3063 | int flags, const char *dev_name, void *data) |
3064 | { | 3064 | { |
3065 | return get_sb_bdev(fs_type, flags, dev_name, data, ntfs_fill_super, | 3065 | return mount_bdev(fs_type, flags, dev_name, data, ntfs_fill_super); |
3066 | mnt); | ||
3067 | } | 3066 | } |
3068 | 3067 | ||
3069 | static struct file_system_type ntfs_fs_type = { | 3068 | static struct file_system_type ntfs_fs_type = { |
3070 | .owner = THIS_MODULE, | 3069 | .owner = THIS_MODULE, |
3071 | .name = "ntfs", | 3070 | .name = "ntfs", |
3072 | .get_sb = ntfs_get_sb, | 3071 | .mount = ntfs_mount, |
3073 | .kill_sb = kill_block_super, | 3072 | .kill_sb = kill_block_super, |
3074 | .fs_flags = FS_REQUIRES_DEV, | 3073 | .fs_flags = FS_REQUIRES_DEV, |
3075 | }; | 3074 | }; |
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index 56f0cb395820..f02c0ef31578 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c | |||
@@ -1236,14 +1236,12 @@ read_super_error: | |||
1236 | return status; | 1236 | return status; |
1237 | } | 1237 | } |
1238 | 1238 | ||
1239 | static int ocfs2_get_sb(struct file_system_type *fs_type, | 1239 | static struct dentry *ocfs2_mount(struct file_system_type *fs_type, |
1240 | int flags, | 1240 | int flags, |
1241 | const char *dev_name, | 1241 | const char *dev_name, |
1242 | void *data, | 1242 | void *data) |
1243 | struct vfsmount *mnt) | ||
1244 | { | 1243 | { |
1245 | return get_sb_bdev(fs_type, flags, dev_name, data, ocfs2_fill_super, | 1244 | return mount_bdev(fs_type, flags, dev_name, data, ocfs2_fill_super); |
1246 | mnt); | ||
1247 | } | 1245 | } |
1248 | 1246 | ||
1249 | static void ocfs2_kill_sb(struct super_block *sb) | 1247 | static void ocfs2_kill_sb(struct super_block *sb) |
@@ -1267,8 +1265,7 @@ out: | |||
1267 | static struct file_system_type ocfs2_fs_type = { | 1265 | static struct file_system_type ocfs2_fs_type = { |
1268 | .owner = THIS_MODULE, | 1266 | .owner = THIS_MODULE, |
1269 | .name = "ocfs2", | 1267 | .name = "ocfs2", |
1270 | .get_sb = ocfs2_get_sb, /* is this called when we mount | 1268 | .mount = ocfs2_mount, |
1271 | * the fs? */ | ||
1272 | .kill_sb = ocfs2_kill_sb, | 1269 | .kill_sb = ocfs2_kill_sb, |
1273 | 1270 | ||
1274 | .fs_flags = FS_REQUIRES_DEV|FS_RENAME_DOES_D_MOVE, | 1271 | .fs_flags = FS_REQUIRES_DEV|FS_RENAME_DOES_D_MOVE, |
diff --git a/fs/omfs/inode.c b/fs/omfs/inode.c index 14a22863291a..e043c4cb9a97 100644 --- a/fs/omfs/inode.c +++ b/fs/omfs/inode.c | |||
@@ -557,17 +557,16 @@ end: | |||
557 | return ret; | 557 | return ret; |
558 | } | 558 | } |
559 | 559 | ||
560 | static int omfs_get_sb(struct file_system_type *fs_type, | 560 | static struct dentry *omfs_mount(struct file_system_type *fs_type, |
561 | int flags, const char *dev_name, | 561 | int flags, const char *dev_name, void *data) |
562 | void *data, struct vfsmount *m) | ||
563 | { | 562 | { |
564 | return get_sb_bdev(fs_type, flags, dev_name, data, omfs_fill_super, m); | 563 | return mount_bdev(fs_type, flags, dev_name, data, omfs_fill_super); |
565 | } | 564 | } |
566 | 565 | ||
567 | static struct file_system_type omfs_fs_type = { | 566 | static struct file_system_type omfs_fs_type = { |
568 | .owner = THIS_MODULE, | 567 | .owner = THIS_MODULE, |
569 | .name = "omfs", | 568 | .name = "omfs", |
570 | .get_sb = omfs_get_sb, | 569 | .mount = omfs_mount, |
571 | .kill_sb = kill_block_super, | 570 | .kill_sb = kill_block_super, |
572 | .fs_flags = FS_REQUIRES_DEV, | 571 | .fs_flags = FS_REQUIRES_DEV, |
573 | }; | 572 | }; |
diff --git a/fs/qnx4/inode.c b/fs/qnx4/inode.c index 01bad30026fc..fcada42f1aa3 100644 --- a/fs/qnx4/inode.c +++ b/fs/qnx4/inode.c | |||
@@ -454,17 +454,16 @@ static void destroy_inodecache(void) | |||
454 | kmem_cache_destroy(qnx4_inode_cachep); | 454 | kmem_cache_destroy(qnx4_inode_cachep); |
455 | } | 455 | } |
456 | 456 | ||
457 | static int qnx4_get_sb(struct file_system_type *fs_type, | 457 | static struct dentry *qnx4_mount(struct file_system_type *fs_type, |
458 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 458 | int flags, const char *dev_name, void *data) |
459 | { | 459 | { |
460 | return get_sb_bdev(fs_type, flags, dev_name, data, qnx4_fill_super, | 460 | return mount_bdev(fs_type, flags, dev_name, data, qnx4_fill_super); |
461 | mnt); | ||
462 | } | 461 | } |
463 | 462 | ||
464 | static struct file_system_type qnx4_fs_type = { | 463 | static struct file_system_type qnx4_fs_type = { |
465 | .owner = THIS_MODULE, | 464 | .owner = THIS_MODULE, |
466 | .name = "qnx4", | 465 | .name = "qnx4", |
467 | .get_sb = qnx4_get_sb, | 466 | .mount = qnx4_mount, |
468 | .kill_sb = kill_block_super, | 467 | .kill_sb = kill_block_super, |
469 | .fs_flags = FS_REQUIRES_DEV, | 468 | .fs_flags = FS_REQUIRES_DEV, |
470 | }; | 469 | }; |
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index e15ff612002d..3bf7a6457f4d 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c | |||
@@ -2213,12 +2213,11 @@ out: | |||
2213 | 2213 | ||
2214 | #endif | 2214 | #endif |
2215 | 2215 | ||
2216 | static int get_super_block(struct file_system_type *fs_type, | 2216 | static struct dentry *get_super_block(struct file_system_type *fs_type, |
2217 | int flags, const char *dev_name, | 2217 | int flags, const char *dev_name, |
2218 | void *data, struct vfsmount *mnt) | 2218 | void *data) |
2219 | { | 2219 | { |
2220 | return get_sb_bdev(fs_type, flags, dev_name, data, reiserfs_fill_super, | 2220 | return mount_bdev(fs_type, flags, dev_name, data, reiserfs_fill_super); |
2221 | mnt); | ||
2222 | } | 2221 | } |
2223 | 2222 | ||
2224 | static int __init init_reiserfs_fs(void) | 2223 | static int __init init_reiserfs_fs(void) |
@@ -2253,7 +2252,7 @@ static void __exit exit_reiserfs_fs(void) | |||
2253 | struct file_system_type reiserfs_fs_type = { | 2252 | struct file_system_type reiserfs_fs_type = { |
2254 | .owner = THIS_MODULE, | 2253 | .owner = THIS_MODULE, |
2255 | .name = "reiserfs", | 2254 | .name = "reiserfs", |
2256 | .get_sb = get_super_block, | 2255 | .mount = get_super_block, |
2257 | .kill_sb = reiserfs_kill_sb, | 2256 | .kill_sb = reiserfs_kill_sb, |
2258 | .fs_flags = FS_REQUIRES_DEV, | 2257 | .fs_flags = FS_REQUIRES_DEV, |
2259 | }; | 2258 | }; |
diff --git a/fs/squashfs/super.c b/fs/squashfs/super.c index 07a4f1156048..24de30ba34c1 100644 --- a/fs/squashfs/super.c +++ b/fs/squashfs/super.c | |||
@@ -370,12 +370,10 @@ static void squashfs_put_super(struct super_block *sb) | |||
370 | } | 370 | } |
371 | 371 | ||
372 | 372 | ||
373 | static int squashfs_get_sb(struct file_system_type *fs_type, int flags, | 373 | static struct dentry *squashfs_mount(struct file_system_type *fs_type, int flags, |
374 | const char *dev_name, void *data, | 374 | const char *dev_name, void *data) |
375 | struct vfsmount *mnt) | ||
376 | { | 375 | { |
377 | return get_sb_bdev(fs_type, flags, dev_name, data, squashfs_fill_super, | 376 | return mount_bdev(fs_type, flags, dev_name, data, squashfs_fill_super); |
378 | mnt); | ||
379 | } | 377 | } |
380 | 378 | ||
381 | 379 | ||
@@ -451,7 +449,7 @@ static void squashfs_destroy_inode(struct inode *inode) | |||
451 | static struct file_system_type squashfs_fs_type = { | 449 | static struct file_system_type squashfs_fs_type = { |
452 | .owner = THIS_MODULE, | 450 | .owner = THIS_MODULE, |
453 | .name = "squashfs", | 451 | .name = "squashfs", |
454 | .get_sb = squashfs_get_sb, | 452 | .mount = squashfs_mount, |
455 | .kill_sb = kill_block_super, | 453 | .kill_sb = kill_block_super, |
456 | .fs_flags = FS_REQUIRES_DEV | 454 | .fs_flags = FS_REQUIRES_DEV |
457 | }; | 455 | }; |
diff --git a/fs/super.c b/fs/super.c index 00a2c9662b55..40989e9a2606 100644 --- a/fs/super.c +++ b/fs/super.c | |||
@@ -762,10 +762,9 @@ static int test_bdev_super(struct super_block *s, void *data) | |||
762 | return (void *)s->s_bdev == data; | 762 | return (void *)s->s_bdev == data; |
763 | } | 763 | } |
764 | 764 | ||
765 | int get_sb_bdev(struct file_system_type *fs_type, | 765 | struct dentry *mount_bdev(struct file_system_type *fs_type, |
766 | int flags, const char *dev_name, void *data, | 766 | int flags, const char *dev_name, void *data, |
767 | int (*fill_super)(struct super_block *, void *, int), | 767 | int (*fill_super)(struct super_block *, void *, int)) |
768 | struct vfsmount *mnt) | ||
769 | { | 768 | { |
770 | struct block_device *bdev; | 769 | struct block_device *bdev; |
771 | struct super_block *s; | 770 | struct super_block *s; |
@@ -777,7 +776,7 @@ int get_sb_bdev(struct file_system_type *fs_type, | |||
777 | 776 | ||
778 | bdev = open_bdev_exclusive(dev_name, mode, fs_type); | 777 | bdev = open_bdev_exclusive(dev_name, mode, fs_type); |
779 | if (IS_ERR(bdev)) | 778 | if (IS_ERR(bdev)) |
780 | return PTR_ERR(bdev); | 779 | return ERR_CAST(bdev); |
781 | 780 | ||
782 | /* | 781 | /* |
783 | * once the super is inserted into the list by sget, s_umount | 782 | * once the super is inserted into the list by sget, s_umount |
@@ -829,15 +828,30 @@ int get_sb_bdev(struct file_system_type *fs_type, | |||
829 | bdev->bd_super = s; | 828 | bdev->bd_super = s; |
830 | } | 829 | } |
831 | 830 | ||
832 | simple_set_mnt(mnt, s); | 831 | return dget(s->s_root); |
833 | return 0; | ||
834 | 832 | ||
835 | error_s: | 833 | error_s: |
836 | error = PTR_ERR(s); | 834 | error = PTR_ERR(s); |
837 | error_bdev: | 835 | error_bdev: |
838 | close_bdev_exclusive(bdev, mode); | 836 | close_bdev_exclusive(bdev, mode); |
839 | error: | 837 | error: |
840 | return error; | 838 | return ERR_PTR(error); |
839 | } | ||
840 | EXPORT_SYMBOL(mount_bdev); | ||
841 | |||
842 | int get_sb_bdev(struct file_system_type *fs_type, | ||
843 | int flags, const char *dev_name, void *data, | ||
844 | int (*fill_super)(struct super_block *, void *, int), | ||
845 | struct vfsmount *mnt) | ||
846 | { | ||
847 | struct dentry *root; | ||
848 | |||
849 | root = mount_bdev(fs_type, flags, dev_name, data, fill_super); | ||
850 | if (IS_ERR(root)) | ||
851 | return PTR_ERR(root); | ||
852 | mnt->mnt_root = root; | ||
853 | mnt->mnt_sb = root->d_sb; | ||
854 | return 0; | ||
841 | } | 855 | } |
842 | 856 | ||
843 | EXPORT_SYMBOL(get_sb_bdev); | 857 | EXPORT_SYMBOL(get_sb_bdev); |
diff --git a/fs/sysv/super.c b/fs/sysv/super.c index a0b0cda6927e..3d9c62be0c10 100644 --- a/fs/sysv/super.c +++ b/fs/sysv/super.c | |||
@@ -526,23 +526,22 @@ failed: | |||
526 | 526 | ||
527 | /* Every kernel module contains stuff like this. */ | 527 | /* Every kernel module contains stuff like this. */ |
528 | 528 | ||
529 | static int sysv_get_sb(struct file_system_type *fs_type, | 529 | static struct dentry *sysv_mount(struct file_system_type *fs_type, |
530 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 530 | int flags, const char *dev_name, void *data) |
531 | { | 531 | { |
532 | return get_sb_bdev(fs_type, flags, dev_name, data, sysv_fill_super, | 532 | return mount_bdev(fs_type, flags, dev_name, data, sysv_fill_super); |
533 | mnt); | ||
534 | } | 533 | } |
535 | 534 | ||
536 | static int v7_get_sb(struct file_system_type *fs_type, | 535 | static struct dentry *v7_mount(struct file_system_type *fs_type, |
537 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 536 | int flags, const char *dev_name, void *data) |
538 | { | 537 | { |
539 | return get_sb_bdev(fs_type, flags, dev_name, data, v7_fill_super, mnt); | 538 | return mount_bdev(fs_type, flags, dev_name, data, v7_fill_super); |
540 | } | 539 | } |
541 | 540 | ||
542 | static struct file_system_type sysv_fs_type = { | 541 | static struct file_system_type sysv_fs_type = { |
543 | .owner = THIS_MODULE, | 542 | .owner = THIS_MODULE, |
544 | .name = "sysv", | 543 | .name = "sysv", |
545 | .get_sb = sysv_get_sb, | 544 | .mount = sysv_mount, |
546 | .kill_sb = kill_block_super, | 545 | .kill_sb = kill_block_super, |
547 | .fs_flags = FS_REQUIRES_DEV, | 546 | .fs_flags = FS_REQUIRES_DEV, |
548 | }; | 547 | }; |
@@ -550,7 +549,7 @@ static struct file_system_type sysv_fs_type = { | |||
550 | static struct file_system_type v7_fs_type = { | 549 | static struct file_system_type v7_fs_type = { |
551 | .owner = THIS_MODULE, | 550 | .owner = THIS_MODULE, |
552 | .name = "v7", | 551 | .name = "v7", |
553 | .get_sb = v7_get_sb, | 552 | .mount = v7_mount, |
554 | .kill_sb = kill_block_super, | 553 | .kill_sb = kill_block_super, |
555 | .fs_flags = FS_REQUIRES_DEV, | 554 | .fs_flags = FS_REQUIRES_DEV, |
556 | }; | 555 | }; |
diff --git a/fs/udf/super.c b/fs/udf/super.c index 76f3d6d97b40..4a5c7c61836a 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c | |||
@@ -107,17 +107,16 @@ struct logicalVolIntegrityDescImpUse *udf_sb_lvidiu(struct udf_sb_info *sbi) | |||
107 | } | 107 | } |
108 | 108 | ||
109 | /* UDF filesystem type */ | 109 | /* UDF filesystem type */ |
110 | static int udf_get_sb(struct file_system_type *fs_type, | 110 | static struct dentry *udf_mount(struct file_system_type *fs_type, |
111 | int flags, const char *dev_name, void *data, | 111 | int flags, const char *dev_name, void *data) |
112 | struct vfsmount *mnt) | ||
113 | { | 112 | { |
114 | return get_sb_bdev(fs_type, flags, dev_name, data, udf_fill_super, mnt); | 113 | return mount_bdev(fs_type, flags, dev_name, data, udf_fill_super); |
115 | } | 114 | } |
116 | 115 | ||
117 | static struct file_system_type udf_fstype = { | 116 | static struct file_system_type udf_fstype = { |
118 | .owner = THIS_MODULE, | 117 | .owner = THIS_MODULE, |
119 | .name = "udf", | 118 | .name = "udf", |
120 | .get_sb = udf_get_sb, | 119 | .mount = udf_mount, |
121 | .kill_sb = kill_block_super, | 120 | .kill_sb = kill_block_super, |
122 | .fs_flags = FS_REQUIRES_DEV, | 121 | .fs_flags = FS_REQUIRES_DEV, |
123 | }; | 122 | }; |
diff --git a/fs/ufs/super.c b/fs/ufs/super.c index 6b9be90dae7d..2c47daed56da 100644 --- a/fs/ufs/super.c +++ b/fs/ufs/super.c | |||
@@ -1454,16 +1454,16 @@ static const struct super_operations ufs_super_ops = { | |||
1454 | .show_options = ufs_show_options, | 1454 | .show_options = ufs_show_options, |
1455 | }; | 1455 | }; |
1456 | 1456 | ||
1457 | static int ufs_get_sb(struct file_system_type *fs_type, | 1457 | static struct dentry *ufs_mount(struct file_system_type *fs_type, |
1458 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 1458 | int flags, const char *dev_name, void *data) |
1459 | { | 1459 | { |
1460 | return get_sb_bdev(fs_type, flags, dev_name, data, ufs_fill_super, mnt); | 1460 | return mount_bdev(fs_type, flags, dev_name, data, ufs_fill_super); |
1461 | } | 1461 | } |
1462 | 1462 | ||
1463 | static struct file_system_type ufs_fs_type = { | 1463 | static struct file_system_type ufs_fs_type = { |
1464 | .owner = THIS_MODULE, | 1464 | .owner = THIS_MODULE, |
1465 | .name = "ufs", | 1465 | .name = "ufs", |
1466 | .get_sb = ufs_get_sb, | 1466 | .mount = ufs_mount, |
1467 | .kill_sb = kill_block_super, | 1467 | .kill_sb = kill_block_super, |
1468 | .fs_flags = FS_REQUIRES_DEV, | 1468 | .fs_flags = FS_REQUIRES_DEV, |
1469 | }; | 1469 | }; |
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index cf808782c065..9f3a78fe6ae4 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c | |||
@@ -1609,16 +1609,14 @@ xfs_fs_fill_super( | |||
1609 | goto out_free_sb; | 1609 | goto out_free_sb; |
1610 | } | 1610 | } |
1611 | 1611 | ||
1612 | STATIC int | 1612 | STATIC struct dentry * |
1613 | xfs_fs_get_sb( | 1613 | xfs_fs_mount( |
1614 | struct file_system_type *fs_type, | 1614 | struct file_system_type *fs_type, |
1615 | int flags, | 1615 | int flags, |
1616 | const char *dev_name, | 1616 | const char *dev_name, |
1617 | void *data, | 1617 | void *data) |
1618 | struct vfsmount *mnt) | ||
1619 | { | 1618 | { |
1620 | return get_sb_bdev(fs_type, flags, dev_name, data, xfs_fs_fill_super, | 1619 | return mount_bdev(fs_type, flags, dev_name, data, xfs_fs_fill_super); |
1621 | mnt); | ||
1622 | } | 1620 | } |
1623 | 1621 | ||
1624 | static const struct super_operations xfs_super_operations = { | 1622 | static const struct super_operations xfs_super_operations = { |
@@ -1639,7 +1637,7 @@ static const struct super_operations xfs_super_operations = { | |||
1639 | static struct file_system_type xfs_fs_type = { | 1637 | static struct file_system_type xfs_fs_type = { |
1640 | .owner = THIS_MODULE, | 1638 | .owner = THIS_MODULE, |
1641 | .name = "xfs", | 1639 | .name = "xfs", |
1642 | .get_sb = xfs_fs_get_sb, | 1640 | .mount = xfs_fs_mount, |
1643 | .kill_sb = kill_block_super, | 1641 | .kill_sb = kill_block_super, |
1644 | .fs_flags = FS_REQUIRES_DEV, | 1642 | .fs_flags = FS_REQUIRES_DEV, |
1645 | }; | 1643 | }; |
diff --git a/include/linux/fs.h b/include/linux/fs.h index c6b474311690..2fab5a24ca51 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1792,6 +1792,9 @@ struct file_system_type { | |||
1792 | extern int get_sb_ns(struct file_system_type *fs_type, int flags, void *data, | 1792 | extern int get_sb_ns(struct file_system_type *fs_type, int flags, void *data, |
1793 | int (*fill_super)(struct super_block *, void *, int), | 1793 | int (*fill_super)(struct super_block *, void *, int), |
1794 | struct vfsmount *mnt); | 1794 | struct vfsmount *mnt); |
1795 | extern struct dentry *mount_bdev(struct file_system_type *fs_type, | ||
1796 | int flags, const char *dev_name, void *data, | ||
1797 | int (*fill_super)(struct super_block *, void *, int)); | ||
1795 | extern int get_sb_bdev(struct file_system_type *fs_type, | 1798 | extern int get_sb_bdev(struct file_system_type *fs_type, |
1796 | int flags, const char *dev_name, void *data, | 1799 | int flags, const char *dev_name, void *data, |
1797 | int (*fill_super)(struct super_block *, void *, int), | 1800 | int (*fill_super)(struct super_block *, void *, int), |