diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-07-25 03:46:36 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-10-29 04:16:31 -0400 |
commit | 3c26ff6e499ee7e6f9f2bc7da5f2f30d80862ecf (patch) | |
tree | bd758d7f15f24aed225a64de77cc535785c50f96 | |
parent | fc14f2fef682df677d64a145256dbd263df2aa7b (diff) |
convert get_sb_nodev() users
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | drivers/staging/autofs/init.c | 8 | ||||
-rw-r--r-- | drivers/staging/pohmelfs/inode.c | 9 | ||||
-rw-r--r-- | drivers/staging/smbfs/inode.c | 8 | ||||
-rw-r--r-- | fs/autofs4/init.c | 8 | ||||
-rw-r--r-- | fs/coda/inode.c | 8 | ||||
-rw-r--r-- | fs/exofs/super.c | 10 | ||||
-rw-r--r-- | fs/fuse/inode.c | 8 | ||||
-rw-r--r-- | fs/hostfs/hostfs_kern.c | 8 | ||||
-rw-r--r-- | fs/hppfs/hppfs.c | 8 | ||||
-rw-r--r-- | fs/hugetlbfs/inode.c | 8 | ||||
-rw-r--r-- | fs/ncpfs/inode.c | 8 | ||||
-rw-r--r-- | fs/ocfs2/dlmfs/dlmfs.c | 8 | ||||
-rw-r--r-- | fs/ramfs/inode.c | 17 | ||||
-rw-r--r-- | fs/super.c | 27 | ||||
-rw-r--r-- | include/linux/fs.h | 3 | ||||
-rw-r--r-- | include/linux/ramfs.h | 4 | ||||
-rw-r--r-- | mm/shmem.c | 10 |
17 files changed, 87 insertions, 73 deletions
diff --git a/drivers/staging/autofs/init.c b/drivers/staging/autofs/init.c index 765c72f42976..5e4b372ea663 100644 --- a/drivers/staging/autofs/init.c +++ b/drivers/staging/autofs/init.c | |||
@@ -14,16 +14,16 @@ | |||
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include "autofs_i.h" | 15 | #include "autofs_i.h" |
16 | 16 | ||
17 | static int autofs_get_sb(struct file_system_type *fs_type, | 17 | static struct dentry *autofs_mount(struct file_system_type *fs_type, |
18 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 18 | int flags, const char *dev_name, void *data) |
19 | { | 19 | { |
20 | return get_sb_nodev(fs_type, flags, data, autofs_fill_super, mnt); | 20 | return mount_nodev(fs_type, flags, data, autofs_fill_super); |
21 | } | 21 | } |
22 | 22 | ||
23 | static struct file_system_type autofs_fs_type = { | 23 | static struct file_system_type autofs_fs_type = { |
24 | .owner = THIS_MODULE, | 24 | .owner = THIS_MODULE, |
25 | .name = "autofs", | 25 | .name = "autofs", |
26 | .get_sb = autofs_get_sb, | 26 | .mount = autofs_mount, |
27 | .kill_sb = autofs_kill_sb, | 27 | .kill_sb = autofs_kill_sb, |
28 | }; | 28 | }; |
29 | 29 | ||
diff --git a/drivers/staging/pohmelfs/inode.c b/drivers/staging/pohmelfs/inode.c index c62d30017c07..61685ccceda8 100644 --- a/drivers/staging/pohmelfs/inode.c +++ b/drivers/staging/pohmelfs/inode.c | |||
@@ -1937,11 +1937,10 @@ err_out_exit: | |||
1937 | /* | 1937 | /* |
1938 | * Some VFS magic here... | 1938 | * Some VFS magic here... |
1939 | */ | 1939 | */ |
1940 | static int pohmelfs_get_sb(struct file_system_type *fs_type, | 1940 | static struct dentry *pohmelfs_mount(struct file_system_type *fs_type, |
1941 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 1941 | int flags, const char *dev_name, void *data) |
1942 | { | 1942 | { |
1943 | return get_sb_nodev(fs_type, flags, data, pohmelfs_fill_super, | 1943 | return mount_nodev(fs_type, flags, data, pohmelfs_fill_super); |
1944 | mnt); | ||
1945 | } | 1944 | } |
1946 | 1945 | ||
1947 | /* | 1946 | /* |
@@ -1958,7 +1957,7 @@ static void pohmelfs_kill_super(struct super_block *sb) | |||
1958 | static struct file_system_type pohmel_fs_type = { | 1957 | static struct file_system_type pohmel_fs_type = { |
1959 | .owner = THIS_MODULE, | 1958 | .owner = THIS_MODULE, |
1960 | .name = "pohmel", | 1959 | .name = "pohmel", |
1961 | .get_sb = pohmelfs_get_sb, | 1960 | .mount = pohmelfs_mount, |
1962 | .kill_sb = pohmelfs_kill_super, | 1961 | .kill_sb = pohmelfs_kill_super, |
1963 | }; | 1962 | }; |
1964 | 1963 | ||
diff --git a/drivers/staging/smbfs/inode.c b/drivers/staging/smbfs/inode.c index 552951aa7498..f9c493591ce7 100644 --- a/drivers/staging/smbfs/inode.c +++ b/drivers/staging/smbfs/inode.c | |||
@@ -793,16 +793,16 @@ out: | |||
793 | return error; | 793 | return error; |
794 | } | 794 | } |
795 | 795 | ||
796 | static int smb_get_sb(struct file_system_type *fs_type, | 796 | static struct dentry *smb_mount(struct file_system_type *fs_type, |
797 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 797 | int flags, const char *dev_name, void *data) |
798 | { | 798 | { |
799 | return get_sb_nodev(fs_type, flags, data, smb_fill_super, mnt); | 799 | return mount_nodev(fs_type, flags, data, smb_fill_super); |
800 | } | 800 | } |
801 | 801 | ||
802 | static struct file_system_type smb_fs_type = { | 802 | static struct file_system_type smb_fs_type = { |
803 | .owner = THIS_MODULE, | 803 | .owner = THIS_MODULE, |
804 | .name = "smbfs", | 804 | .name = "smbfs", |
805 | .get_sb = smb_get_sb, | 805 | .mount = smb_mount, |
806 | .kill_sb = kill_anon_super, | 806 | .kill_sb = kill_anon_super, |
807 | .fs_flags = FS_BINARY_MOUNTDATA, | 807 | .fs_flags = FS_BINARY_MOUNTDATA, |
808 | }; | 808 | }; |
diff --git a/fs/autofs4/init.c b/fs/autofs4/init.c index 9722e4bd8957..c038727b4050 100644 --- a/fs/autofs4/init.c +++ b/fs/autofs4/init.c | |||
@@ -14,16 +14,16 @@ | |||
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include "autofs_i.h" | 15 | #include "autofs_i.h" |
16 | 16 | ||
17 | static int autofs_get_sb(struct file_system_type *fs_type, | 17 | static struct dentry *autofs_mount(struct file_system_type *fs_type, |
18 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 18 | int flags, const char *dev_name, void *data) |
19 | { | 19 | { |
20 | return get_sb_nodev(fs_type, flags, data, autofs4_fill_super, mnt); | 20 | return mount_nodev(fs_type, flags, data, autofs4_fill_super); |
21 | } | 21 | } |
22 | 22 | ||
23 | static struct file_system_type autofs_fs_type = { | 23 | static struct file_system_type autofs_fs_type = { |
24 | .owner = THIS_MODULE, | 24 | .owner = THIS_MODULE, |
25 | .name = "autofs", | 25 | .name = "autofs", |
26 | .get_sb = autofs_get_sb, | 26 | .mount = autofs_mount, |
27 | .kill_sb = autofs4_kill_sb, | 27 | .kill_sb = autofs4_kill_sb, |
28 | }; | 28 | }; |
29 | 29 | ||
diff --git a/fs/coda/inode.c b/fs/coda/inode.c index 7993b96ca348..5ea57c8c7f97 100644 --- a/fs/coda/inode.c +++ b/fs/coda/inode.c | |||
@@ -306,16 +306,16 @@ static int coda_statfs(struct dentry *dentry, struct kstatfs *buf) | |||
306 | 306 | ||
307 | /* init_coda: used by filesystems.c to register coda */ | 307 | /* init_coda: used by filesystems.c to register coda */ |
308 | 308 | ||
309 | static int coda_get_sb(struct file_system_type *fs_type, | 309 | static struct dentry *coda_mount(struct file_system_type *fs_type, |
310 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 310 | int flags, const char *dev_name, void *data) |
311 | { | 311 | { |
312 | return get_sb_nodev(fs_type, flags, data, coda_fill_super, mnt); | 312 | return mount_nodev(fs_type, flags, data, coda_fill_super); |
313 | } | 313 | } |
314 | 314 | ||
315 | struct file_system_type coda_fs_type = { | 315 | struct file_system_type coda_fs_type = { |
316 | .owner = THIS_MODULE, | 316 | .owner = THIS_MODULE, |
317 | .name = "coda", | 317 | .name = "coda", |
318 | .get_sb = coda_get_sb, | 318 | .mount = coda_mount, |
319 | .kill_sb = kill_anon_super, | 319 | .kill_sb = kill_anon_super, |
320 | .fs_flags = FS_BINARY_MOUNTDATA, | 320 | .fs_flags = FS_BINARY_MOUNTDATA, |
321 | }; | 321 | }; |
diff --git a/fs/exofs/super.c b/fs/exofs/super.c index 047e92fa3af8..79c3ae6e0456 100644 --- a/fs/exofs/super.c +++ b/fs/exofs/super.c | |||
@@ -659,19 +659,19 @@ free_bdi: | |||
659 | /* | 659 | /* |
660 | * Set up the superblock (calls exofs_fill_super eventually) | 660 | * Set up the superblock (calls exofs_fill_super eventually) |
661 | */ | 661 | */ |
662 | static int exofs_get_sb(struct file_system_type *type, | 662 | static struct dentry *exofs_mount(struct file_system_type *type, |
663 | int flags, const char *dev_name, | 663 | int flags, const char *dev_name, |
664 | void *data, struct vfsmount *mnt) | 664 | void *data) |
665 | { | 665 | { |
666 | struct exofs_mountopt opts; | 666 | struct exofs_mountopt opts; |
667 | int ret; | 667 | int ret; |
668 | 668 | ||
669 | ret = parse_options(data, &opts); | 669 | ret = parse_options(data, &opts); |
670 | if (ret) | 670 | if (ret) |
671 | return ret; | 671 | return ERR_PTR(ret); |
672 | 672 | ||
673 | opts.dev_name = dev_name; | 673 | opts.dev_name = dev_name; |
674 | return get_sb_nodev(type, flags, &opts, exofs_fill_super, mnt); | 674 | return mount_nodev(type, flags, &opts, exofs_fill_super); |
675 | } | 675 | } |
676 | 676 | ||
677 | /* | 677 | /* |
@@ -809,7 +809,7 @@ static const struct export_operations exofs_export_ops = { | |||
809 | static struct file_system_type exofs_type = { | 809 | static struct file_system_type exofs_type = { |
810 | .owner = THIS_MODULE, | 810 | .owner = THIS_MODULE, |
811 | .name = "exofs", | 811 | .name = "exofs", |
812 | .get_sb = exofs_get_sb, | 812 | .mount = exofs_mount, |
813 | .kill_sb = generic_shutdown_super, | 813 | .kill_sb = generic_shutdown_super, |
814 | }; | 814 | }; |
815 | 815 | ||
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index edf6a1843533..cfce3ad86a92 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c | |||
@@ -1041,11 +1041,11 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent) | |||
1041 | return err; | 1041 | return err; |
1042 | } | 1042 | } |
1043 | 1043 | ||
1044 | static int fuse_get_sb(struct file_system_type *fs_type, | 1044 | static struct dentry *fuse_mount(struct file_system_type *fs_type, |
1045 | int flags, const char *dev_name, | 1045 | int flags, const char *dev_name, |
1046 | void *raw_data, struct vfsmount *mnt) | 1046 | void *raw_data) |
1047 | { | 1047 | { |
1048 | return get_sb_nodev(fs_type, flags, raw_data, fuse_fill_super, mnt); | 1048 | return mount_nodev(fs_type, flags, raw_data, fuse_fill_super); |
1049 | } | 1049 | } |
1050 | 1050 | ||
1051 | static void fuse_kill_sb_anon(struct super_block *sb) | 1051 | static void fuse_kill_sb_anon(struct super_block *sb) |
@@ -1065,7 +1065,7 @@ static struct file_system_type fuse_fs_type = { | |||
1065 | .owner = THIS_MODULE, | 1065 | .owner = THIS_MODULE, |
1066 | .name = "fuse", | 1066 | .name = "fuse", |
1067 | .fs_flags = FS_HAS_SUBTYPE, | 1067 | .fs_flags = FS_HAS_SUBTYPE, |
1068 | .get_sb = fuse_get_sb, | 1068 | .mount = fuse_mount, |
1069 | .kill_sb = fuse_kill_sb_anon, | 1069 | .kill_sb = fuse_kill_sb_anon, |
1070 | }; | 1070 | }; |
1071 | 1071 | ||
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index cd7c93917cc7..2c0f148a49e6 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c | |||
@@ -962,11 +962,11 @@ out: | |||
962 | return err; | 962 | return err; |
963 | } | 963 | } |
964 | 964 | ||
965 | static int hostfs_read_sb(struct file_system_type *type, | 965 | static struct dentry *hostfs_read_sb(struct file_system_type *type, |
966 | int flags, const char *dev_name, | 966 | int flags, const char *dev_name, |
967 | void *data, struct vfsmount *mnt) | 967 | void *data) |
968 | { | 968 | { |
969 | return get_sb_nodev(type, flags, data, hostfs_fill_sb_common, mnt); | 969 | return mount_nodev(type, flags, data, hostfs_fill_sb_common); |
970 | } | 970 | } |
971 | 971 | ||
972 | static void hostfs_kill_sb(struct super_block *s) | 972 | static void hostfs_kill_sb(struct super_block *s) |
@@ -978,7 +978,7 @@ static void hostfs_kill_sb(struct super_block *s) | |||
978 | static struct file_system_type hostfs_type = { | 978 | static struct file_system_type hostfs_type = { |
979 | .owner = THIS_MODULE, | 979 | .owner = THIS_MODULE, |
980 | .name = "hostfs", | 980 | .name = "hostfs", |
981 | .get_sb = hostfs_read_sb, | 981 | .mount = hostfs_read_sb, |
982 | .kill_sb = hostfs_kill_sb, | 982 | .kill_sb = hostfs_kill_sb, |
983 | .fs_flags = 0, | 983 | .fs_flags = 0, |
984 | }; | 984 | }; |
diff --git a/fs/hppfs/hppfs.c b/fs/hppfs/hppfs.c index 4e2a45ea6140..f702b5f713fc 100644 --- a/fs/hppfs/hppfs.c +++ b/fs/hppfs/hppfs.c | |||
@@ -748,17 +748,17 @@ static int hppfs_fill_super(struct super_block *sb, void *d, int silent) | |||
748 | return(err); | 748 | return(err); |
749 | } | 749 | } |
750 | 750 | ||
751 | static int hppfs_read_super(struct file_system_type *type, | 751 | static struct dentry *hppfs_read_super(struct file_system_type *type, |
752 | int flags, const char *dev_name, | 752 | int flags, const char *dev_name, |
753 | void *data, struct vfsmount *mnt) | 753 | void *data) |
754 | { | 754 | { |
755 | return get_sb_nodev(type, flags, data, hppfs_fill_super, mnt); | 755 | return mount_nodev(type, flags, data, hppfs_fill_super); |
756 | } | 756 | } |
757 | 757 | ||
758 | static struct file_system_type hppfs_type = { | 758 | static struct file_system_type hppfs_type = { |
759 | .owner = THIS_MODULE, | 759 | .owner = THIS_MODULE, |
760 | .name = "hppfs", | 760 | .name = "hppfs", |
761 | .get_sb = hppfs_read_super, | 761 | .mount = hppfs_read_super, |
762 | .kill_sb = kill_anon_super, | 762 | .kill_sb = kill_anon_super, |
763 | .fs_flags = 0, | 763 | .fs_flags = 0, |
764 | }; | 764 | }; |
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index b14be3f781c7..d6cfac1f0a40 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c | |||
@@ -896,15 +896,15 @@ void hugetlb_put_quota(struct address_space *mapping, long delta) | |||
896 | } | 896 | } |
897 | } | 897 | } |
898 | 898 | ||
899 | static int hugetlbfs_get_sb(struct file_system_type *fs_type, | 899 | static struct dentry *hugetlbfs_mount(struct file_system_type *fs_type, |
900 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 900 | int flags, const char *dev_name, void *data) |
901 | { | 901 | { |
902 | return get_sb_nodev(fs_type, flags, data, hugetlbfs_fill_super, mnt); | 902 | return mount_nodev(fs_type, flags, data, hugetlbfs_fill_super); |
903 | } | 903 | } |
904 | 904 | ||
905 | static struct file_system_type hugetlbfs_fs_type = { | 905 | static struct file_system_type hugetlbfs_fs_type = { |
906 | .name = "hugetlbfs", | 906 | .name = "hugetlbfs", |
907 | .get_sb = hugetlbfs_get_sb, | 907 | .mount = hugetlbfs_mount, |
908 | .kill_sb = kill_litter_super, | 908 | .kill_sb = kill_litter_super, |
909 | }; | 909 | }; |
910 | 910 | ||
diff --git a/fs/ncpfs/inode.c b/fs/ncpfs/inode.c index 985fabb26aca..d290545aa0c4 100644 --- a/fs/ncpfs/inode.c +++ b/fs/ncpfs/inode.c | |||
@@ -1020,16 +1020,16 @@ out: | |||
1020 | return result; | 1020 | return result; |
1021 | } | 1021 | } |
1022 | 1022 | ||
1023 | static int ncp_get_sb(struct file_system_type *fs_type, | 1023 | static struct dentry *ncp_mount(struct file_system_type *fs_type, |
1024 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 1024 | int flags, const char *dev_name, void *data) |
1025 | { | 1025 | { |
1026 | return get_sb_nodev(fs_type, flags, data, ncp_fill_super, mnt); | 1026 | return mount_nodev(fs_type, flags, data, ncp_fill_super); |
1027 | } | 1027 | } |
1028 | 1028 | ||
1029 | static struct file_system_type ncp_fs_type = { | 1029 | static struct file_system_type ncp_fs_type = { |
1030 | .owner = THIS_MODULE, | 1030 | .owner = THIS_MODULE, |
1031 | .name = "ncpfs", | 1031 | .name = "ncpfs", |
1032 | .get_sb = ncp_get_sb, | 1032 | .mount = ncp_mount, |
1033 | .kill_sb = kill_anon_super, | 1033 | .kill_sb = kill_anon_super, |
1034 | .fs_flags = FS_BINARY_MOUNTDATA, | 1034 | .fs_flags = FS_BINARY_MOUNTDATA, |
1035 | }; | 1035 | }; |
diff --git a/fs/ocfs2/dlmfs/dlmfs.c b/fs/ocfs2/dlmfs/dlmfs.c index 75e115f1bd73..b2df490a19ed 100644 --- a/fs/ocfs2/dlmfs/dlmfs.c +++ b/fs/ocfs2/dlmfs/dlmfs.c | |||
@@ -643,16 +643,16 @@ static const struct inode_operations dlmfs_file_inode_operations = { | |||
643 | .setattr = dlmfs_file_setattr, | 643 | .setattr = dlmfs_file_setattr, |
644 | }; | 644 | }; |
645 | 645 | ||
646 | static int dlmfs_get_sb(struct file_system_type *fs_type, | 646 | static struct dentry *dlmfs_mount(struct file_system_type *fs_type, |
647 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 647 | int flags, const char *dev_name, void *data) |
648 | { | 648 | { |
649 | return get_sb_nodev(fs_type, flags, data, dlmfs_fill_super, mnt); | 649 | return mount_nodev(fs_type, flags, data, dlmfs_fill_super); |
650 | } | 650 | } |
651 | 651 | ||
652 | static struct file_system_type dlmfs_fs_type = { | 652 | static struct file_system_type dlmfs_fs_type = { |
653 | .owner = THIS_MODULE, | 653 | .owner = THIS_MODULE, |
654 | .name = "ocfs2_dlmfs", | 654 | .name = "ocfs2_dlmfs", |
655 | .get_sb = dlmfs_get_sb, | 655 | .mount = dlmfs_mount, |
656 | .kill_sb = kill_litter_super, | 656 | .kill_sb = kill_litter_super, |
657 | }; | 657 | }; |
658 | 658 | ||
diff --git a/fs/ramfs/inode.c b/fs/ramfs/inode.c index 67fadb1ad2c1..eacb166fb259 100644 --- a/fs/ramfs/inode.c +++ b/fs/ramfs/inode.c | |||
@@ -255,17 +255,16 @@ fail: | |||
255 | return err; | 255 | return err; |
256 | } | 256 | } |
257 | 257 | ||
258 | int ramfs_get_sb(struct file_system_type *fs_type, | 258 | struct dentry *ramfs_mount(struct file_system_type *fs_type, |
259 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 259 | int flags, const char *dev_name, void *data) |
260 | { | 260 | { |
261 | return get_sb_nodev(fs_type, flags, data, ramfs_fill_super, mnt); | 261 | return mount_nodev(fs_type, flags, data, ramfs_fill_super); |
262 | } | 262 | } |
263 | 263 | ||
264 | static int rootfs_get_sb(struct file_system_type *fs_type, | 264 | static struct dentry *rootfs_mount(struct file_system_type *fs_type, |
265 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 265 | int flags, const char *dev_name, void *data) |
266 | { | 266 | { |
267 | return get_sb_nodev(fs_type, flags|MS_NOUSER, data, ramfs_fill_super, | 267 | return mount_nodev(fs_type, flags|MS_NOUSER, data, ramfs_fill_super); |
268 | mnt); | ||
269 | } | 268 | } |
270 | 269 | ||
271 | static void ramfs_kill_sb(struct super_block *sb) | 270 | static void ramfs_kill_sb(struct super_block *sb) |
@@ -276,12 +275,12 @@ static void ramfs_kill_sb(struct super_block *sb) | |||
276 | 275 | ||
277 | static struct file_system_type ramfs_fs_type = { | 276 | static struct file_system_type ramfs_fs_type = { |
278 | .name = "ramfs", | 277 | .name = "ramfs", |
279 | .get_sb = ramfs_get_sb, | 278 | .mount = ramfs_mount, |
280 | .kill_sb = ramfs_kill_sb, | 279 | .kill_sb = ramfs_kill_sb, |
281 | }; | 280 | }; |
282 | static struct file_system_type rootfs_fs_type = { | 281 | static struct file_system_type rootfs_fs_type = { |
283 | .name = "rootfs", | 282 | .name = "rootfs", |
284 | .get_sb = rootfs_get_sb, | 283 | .mount = rootfs_mount, |
285 | .kill_sb = kill_litter_super, | 284 | .kill_sb = kill_litter_super, |
286 | }; | 285 | }; |
287 | 286 | ||
diff --git a/fs/super.c b/fs/super.c index 6f021a171ac6..f6a7bf1fff2b 100644 --- a/fs/super.c +++ b/fs/super.c | |||
@@ -870,29 +870,42 @@ void kill_block_super(struct super_block *sb) | |||
870 | EXPORT_SYMBOL(kill_block_super); | 870 | EXPORT_SYMBOL(kill_block_super); |
871 | #endif | 871 | #endif |
872 | 872 | ||
873 | int get_sb_nodev(struct file_system_type *fs_type, | 873 | struct dentry *mount_nodev(struct file_system_type *fs_type, |
874 | int flags, void *data, | 874 | int flags, void *data, |
875 | int (*fill_super)(struct super_block *, void *, int), | 875 | int (*fill_super)(struct super_block *, void *, int)) |
876 | struct vfsmount *mnt) | ||
877 | { | 876 | { |
878 | int error; | 877 | int error; |
879 | struct super_block *s = sget(fs_type, NULL, set_anon_super, NULL); | 878 | struct super_block *s = sget(fs_type, NULL, set_anon_super, NULL); |
880 | 879 | ||
881 | if (IS_ERR(s)) | 880 | if (IS_ERR(s)) |
882 | return PTR_ERR(s); | 881 | return ERR_CAST(s); |
883 | 882 | ||
884 | s->s_flags = flags; | 883 | s->s_flags = flags; |
885 | 884 | ||
886 | error = fill_super(s, data, flags & MS_SILENT ? 1 : 0); | 885 | error = fill_super(s, data, flags & MS_SILENT ? 1 : 0); |
887 | if (error) { | 886 | if (error) { |
888 | deactivate_locked_super(s); | 887 | deactivate_locked_super(s); |
889 | return error; | 888 | return ERR_PTR(error); |
890 | } | 889 | } |
891 | s->s_flags |= MS_ACTIVE; | 890 | s->s_flags |= MS_ACTIVE; |
892 | simple_set_mnt(mnt, s); | 891 | return dget(s->s_root); |
893 | return 0; | ||
894 | } | 892 | } |
893 | EXPORT_SYMBOL(mount_nodev); | ||
894 | |||
895 | int get_sb_nodev(struct file_system_type *fs_type, | ||
896 | int flags, void *data, | ||
897 | int (*fill_super)(struct super_block *, void *, int), | ||
898 | struct vfsmount *mnt) | ||
899 | { | ||
900 | struct dentry *root; | ||
895 | 901 | ||
902 | root = mount_nodev(fs_type, flags, data, fill_super); | ||
903 | if (IS_ERR(root)) | ||
904 | return PTR_ERR(root); | ||
905 | mnt->mnt_root = root; | ||
906 | mnt->mnt_sb = root->d_sb; | ||
907 | return 0; | ||
908 | } | ||
896 | EXPORT_SYMBOL(get_sb_nodev); | 909 | EXPORT_SYMBOL(get_sb_nodev); |
897 | 910 | ||
898 | static int compare_single(struct super_block *s, void *p) | 911 | static int compare_single(struct super_block *s, void *p) |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 0aa2f1202afa..4c3a29ddcacb 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1806,6 +1806,9 @@ extern int get_sb_single(struct file_system_type *fs_type, | |||
1806 | int flags, void *data, | 1806 | int flags, void *data, |
1807 | int (*fill_super)(struct super_block *, void *, int), | 1807 | int (*fill_super)(struct super_block *, void *, int), |
1808 | struct vfsmount *mnt); | 1808 | struct vfsmount *mnt); |
1809 | extern struct dentry *mount_nodev(struct file_system_type *fs_type, | ||
1810 | int flags, void *data, | ||
1811 | int (*fill_super)(struct super_block *, void *, int)); | ||
1809 | extern int get_sb_nodev(struct file_system_type *fs_type, | 1812 | extern int get_sb_nodev(struct file_system_type *fs_type, |
1810 | int flags, void *data, | 1813 | int flags, void *data, |
1811 | int (*fill_super)(struct super_block *, void *, int), | 1814 | int (*fill_super)(struct super_block *, void *, int), |
diff --git a/include/linux/ramfs.h b/include/linux/ramfs.h index e7320b5e82fb..3a8f0c9b2933 100644 --- a/include/linux/ramfs.h +++ b/include/linux/ramfs.h | |||
@@ -3,8 +3,8 @@ | |||
3 | 3 | ||
4 | struct inode *ramfs_get_inode(struct super_block *sb, const struct inode *dir, | 4 | struct inode *ramfs_get_inode(struct super_block *sb, const struct inode *dir, |
5 | int mode, dev_t dev); | 5 | int mode, dev_t dev); |
6 | extern int ramfs_get_sb(struct file_system_type *fs_type, | 6 | extern struct dentry *ramfs_mount(struct file_system_type *fs_type, |
7 | int flags, const char *dev_name, void *data, struct vfsmount *mnt); | 7 | int flags, const char *dev_name, void *data); |
8 | 8 | ||
9 | #ifndef CONFIG_MMU | 9 | #ifndef CONFIG_MMU |
10 | extern int ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize); | 10 | extern int ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize); |
diff --git a/mm/shmem.c b/mm/shmem.c index f6d350e8adc5..47fdeeb9d636 100644 --- a/mm/shmem.c +++ b/mm/shmem.c | |||
@@ -2538,16 +2538,16 @@ static const struct vm_operations_struct shmem_vm_ops = { | |||
2538 | }; | 2538 | }; |
2539 | 2539 | ||
2540 | 2540 | ||
2541 | static int shmem_get_sb(struct file_system_type *fs_type, | 2541 | static struct dentry *shmem_mount(struct file_system_type *fs_type, |
2542 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 2542 | int flags, const char *dev_name, void *data) |
2543 | { | 2543 | { |
2544 | return get_sb_nodev(fs_type, flags, data, shmem_fill_super, mnt); | 2544 | return mount_nodev(fs_type, flags, data, shmem_fill_super); |
2545 | } | 2545 | } |
2546 | 2546 | ||
2547 | static struct file_system_type tmpfs_fs_type = { | 2547 | static struct file_system_type tmpfs_fs_type = { |
2548 | .owner = THIS_MODULE, | 2548 | .owner = THIS_MODULE, |
2549 | .name = "tmpfs", | 2549 | .name = "tmpfs", |
2550 | .get_sb = shmem_get_sb, | 2550 | .mount = shmem_mount, |
2551 | .kill_sb = kill_litter_super, | 2551 | .kill_sb = kill_litter_super, |
2552 | }; | 2552 | }; |
2553 | 2553 | ||
@@ -2643,7 +2643,7 @@ out: | |||
2643 | 2643 | ||
2644 | static struct file_system_type tmpfs_fs_type = { | 2644 | static struct file_system_type tmpfs_fs_type = { |
2645 | .name = "tmpfs", | 2645 | .name = "tmpfs", |
2646 | .get_sb = ramfs_get_sb, | 2646 | .mount = ramfs_mount, |
2647 | .kill_sb = kill_litter_super, | 2647 | .kill_sb = kill_litter_super, |
2648 | }; | 2648 | }; |
2649 | 2649 | ||