aboutsummaryrefslogtreecommitdiffstats
path: root/fs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/super.c')
-rw-r--r--fs/super.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/fs/super.c b/fs/super.c
index 156eae5ed503..d8c8b1d2d010 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -487,22 +487,9 @@ struct super_block *get_active_super(struct block_device *bdev)
487 if (sb->s_bdev != bdev) 487 if (sb->s_bdev != bdev)
488 continue; 488 continue;
489 489
490 sb->s_count++; 490 if (grab_super(sb)) /* drops sb_lock */
491 spin_unlock(&sb_lock); 491 return sb;
492 down_write(&sb->s_umount); 492
493 if (sb->s_root) {
494 spin_lock(&sb_lock);
495 if (sb->s_count > S_BIAS) {
496 atomic_inc(&sb->s_active);
497 sb->s_count--;
498 spin_unlock(&sb_lock);
499 return sb;
500 }
501 spin_unlock(&sb_lock);
502 }
503 up_write(&sb->s_umount);
504 put_super(sb);
505 yield();
506 spin_lock(&sb_lock); 493 spin_lock(&sb_lock);
507 } 494 }
508 spin_unlock(&sb_lock); 495 spin_unlock(&sb_lock);