diff options
Diffstat (limited to 'fs/super.c')
-rw-r--r-- | fs/super.c | 32 |
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 @@ | |||
40 | #include <asm/uaccess.h> | 40 | #include <asm/uaccess.h> |
41 | 41 | ||
42 | 42 | ||
43 | void get_filesystem(struct file_system_type *fs); | ||
44 | void put_filesystem(struct file_system_type *fs); | ||
45 | struct file_system_type *get_fs_type(const char *name); | ||
46 | |||
47 | LIST_HEAD(super_blocks); | 43 | LIST_HEAD(super_blocks); |
48 | DEFINE_SPINLOCK(sb_lock); | 44 | DEFINE_SPINLOCK(sb_lock); |
49 | 45 | ||
@@ -336,21 +332,21 @@ struct super_block *sget(struct file_system_type *type, | |||
336 | void *data) | 332 | void *data) |
337 | { | 333 | { |
338 | struct super_block *s = NULL; | 334 | struct super_block *s = NULL; |
339 | struct list_head *p; | 335 | struct super_block *old; |
340 | int err; | 336 | int err; |
341 | 337 | ||
342 | retry: | 338 | retry: |
343 | spin_lock(&sb_lock); | 339 | spin_lock(&sb_lock); |
344 | if (test) list_for_each(p, &type->fs_supers) { | 340 | if (test) { |
345 | struct super_block *old; | 341 | list_for_each_entry(old, &type->fs_supers, s_instances) { |
346 | old = list_entry(p, struct super_block, s_instances); | 342 | if (!test(old, data)) |
347 | if (!test(old, data)) | 343 | continue; |
348 | continue; | 344 | if (!grab_super(old)) |
349 | if (!grab_super(old)) | 345 | goto retry; |
350 | goto retry; | 346 | if (s) |
351 | if (s) | 347 | destroy_super(s); |
352 | destroy_super(s); | 348 | return old; |
353 | return old; | 349 | } |
354 | } | 350 | } |
355 | if (!s) { | 351 | if (!s) { |
356 | spin_unlock(&sb_lock); | 352 | spin_unlock(&sb_lock); |
@@ -948,9 +944,9 @@ do_kern_mount(const char *fstype, int flags, const char *name, void *data) | |||
948 | return mnt; | 944 | return mnt; |
949 | } | 945 | } |
950 | 946 | ||
951 | struct vfsmount *kern_mount(struct file_system_type *type) | 947 | struct vfsmount *kern_mount_data(struct file_system_type *type, void *data) |
952 | { | 948 | { |
953 | return vfs_kern_mount(type, 0, type->name, NULL); | 949 | return vfs_kern_mount(type, MS_KERNMOUNT, type->name, data); |
954 | } | 950 | } |
955 | 951 | ||
956 | EXPORT_SYMBOL(kern_mount); | 952 | EXPORT_SYMBOL_GPL(kern_mount_data); |