diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-03-22 20:09:33 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-05-21 18:31:15 -0400 |
commit | 6754af64641e8224c281ee5714e012e3ed41f701 (patch) | |
tree | 248a8c01aae46f98505d8c196393fae629f9691a /fs/buffer.c | |
parent | 8edd64bd6089e21f47dcdebb14b598b713213ddc (diff) |
Convert simple loops over superblocks to list_for_each_entry_safe
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/buffer.c')
-rw-r--r-- | fs/buffer.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index 021ec4da9932..ded29b0fdac3 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -562,12 +562,11 @@ repeat: | |||
562 | 562 | ||
563 | static void do_thaw_all(struct work_struct *work) | 563 | static void do_thaw_all(struct work_struct *work) |
564 | { | 564 | { |
565 | struct super_block *sb; | 565 | struct super_block *sb, *n; |
566 | char b[BDEVNAME_SIZE]; | 566 | char b[BDEVNAME_SIZE]; |
567 | 567 | ||
568 | spin_lock(&sb_lock); | 568 | spin_lock(&sb_lock); |
569 | restart: | 569 | list_for_each_entry_safe(sb, n, &super_blocks, s_list) { |
570 | list_for_each_entry(sb, &super_blocks, s_list) { | ||
571 | if (list_empty(&sb->s_instances)) | 570 | if (list_empty(&sb->s_instances)) |
572 | continue; | 571 | continue; |
573 | sb->s_count++; | 572 | sb->s_count++; |
@@ -578,8 +577,6 @@ restart: | |||
578 | bdevname(sb->s_bdev, b)); | 577 | bdevname(sb->s_bdev, b)); |
579 | up_read(&sb->s_umount); | 578 | up_read(&sb->s_umount); |
580 | spin_lock(&sb_lock); | 579 | spin_lock(&sb_lock); |
581 | if (__put_super_and_need_restart(sb)) | ||
582 | goto restart; | ||
583 | } | 580 | } |
584 | spin_unlock(&sb_lock); | 581 | spin_unlock(&sb_lock); |
585 | kfree(work); | 582 | kfree(work); |