diff options
Diffstat (limited to 'fs/super.c')
-rw-r--r-- | fs/super.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/super.c b/fs/super.c index 12f123712161..7465d4364208 100644 --- a/fs/super.c +++ b/fs/super.c | |||
@@ -447,14 +447,13 @@ struct super_block *sget(struct file_system_type *type, | |||
447 | void *data) | 447 | void *data) |
448 | { | 448 | { |
449 | struct super_block *s = NULL; | 449 | struct super_block *s = NULL; |
450 | struct hlist_node *node; | ||
451 | struct super_block *old; | 450 | struct super_block *old; |
452 | int err; | 451 | int err; |
453 | 452 | ||
454 | retry: | 453 | retry: |
455 | spin_lock(&sb_lock); | 454 | spin_lock(&sb_lock); |
456 | if (test) { | 455 | if (test) { |
457 | hlist_for_each_entry(old, node, &type->fs_supers, s_instances) { | 456 | hlist_for_each_entry(old, &type->fs_supers, s_instances) { |
458 | if (!test(old, data)) | 457 | if (!test(old, data)) |
459 | continue; | 458 | continue; |
460 | if (!grab_super(old)) | 459 | if (!grab_super(old)) |
@@ -554,10 +553,9 @@ void iterate_supers_type(struct file_system_type *type, | |||
554 | void (*f)(struct super_block *, void *), void *arg) | 553 | void (*f)(struct super_block *, void *), void *arg) |
555 | { | 554 | { |
556 | struct super_block *sb, *p = NULL; | 555 | struct super_block *sb, *p = NULL; |
557 | struct hlist_node *node; | ||
558 | 556 | ||
559 | spin_lock(&sb_lock); | 557 | spin_lock(&sb_lock); |
560 | hlist_for_each_entry(sb, node, &type->fs_supers, s_instances) { | 558 | hlist_for_each_entry(sb, &type->fs_supers, s_instances) { |
561 | sb->s_count++; | 559 | sb->s_count++; |
562 | spin_unlock(&sb_lock); | 560 | spin_unlock(&sb_lock); |
563 | 561 | ||
@@ -842,7 +840,7 @@ int get_anon_bdev(dev_t *p) | |||
842 | else if (error) | 840 | else if (error) |
843 | return -EAGAIN; | 841 | return -EAGAIN; |
844 | 842 | ||
845 | if ((dev & MAX_IDR_MASK) == (1 << MINORBITS)) { | 843 | if (dev == (1 << MINORBITS)) { |
846 | spin_lock(&unnamed_dev_lock); | 844 | spin_lock(&unnamed_dev_lock); |
847 | ida_remove(&unnamed_dev_ida, dev); | 845 | ida_remove(&unnamed_dev_ida, dev); |
848 | if (unnamed_dev_start > dev) | 846 | if (unnamed_dev_start > dev) |