summaryrefslogtreecommitdiff
path: root/fs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/super.c')
-rw-r--r--fs/super.c32
1 files changed, 14 insertions, 18 deletions
diff --git a/fs/super.c b/fs/super.c
index 1bfcca2104be..d28fde7e1cfb 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -40,10 +40,6 @@
#include <asm/uaccess.h>
-void get_filesystem(struct file_system_type *fs);
-void put_filesystem(struct file_system_type *fs);
-struct file_system_type *get_fs_type(const char *name);
-
LIST_HEAD(super_blocks);
DEFINE_SPINLOCK(sb_lock);
@@ -336,21 +332,21 @@ struct super_block *sget(struct file_system_type *type,
void *data)
{
struct super_block *s = NULL;
- struct list_head *p;
+ struct super_block *old;
int err;
retry:
spin_lock(&sb_lock);
- if (test) list_for_each(p, &type->fs_supers) {
- struct super_block *old;
- old = list_entry(p, struct super_block, s_instances);
- if (!test(old, data))
- continue;
- if (!grab_super(old))
- goto retry;
- if (s)
- destroy_super(s);
- return old;
+ if (test) {
+ list_for_each_entry(old, &type->fs_supers, s_instances) {
+ if (!test(old, data))
+ continue;
+ if (!grab_super(old))
+ goto retry;
+ if (s)
+ destroy_super(s);
+ return old;
+ }
}
if (!s) {
spin_unlock(&sb_lock);
@@ -948,9 +944,9 @@ do_kern_mount(const char *fstype, int flags, const char *name, void *data)
return mnt;
}
-struct vfsmount *kern_mount(struct file_system_type *type)
+struct vfsmount *kern_mount_data(struct file_system_type *type, void *data)
{
- return vfs_kern_mount(type, 0, type->name, NULL);
+ return vfs_kern_mount(type, MS_KERNMOUNT, type->name, data);
}
-EXPORT_SYMBOL(kern_mount);
+EXPORT_SYMBOL_GPL(kern_mount_data);