Convert simple loops over superblocks to list_for_each_entry_safe

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro
2010-03-22 20:09:33 -04:00
parent 8edd64bd60
commit 6754af6464
4 changed files with 11 additions and 20 deletions

View File

@@ -562,12 +562,11 @@ repeat:
static void do_thaw_all(struct work_struct *work)
{
struct super_block *sb;
struct super_block *sb, *n;
char b[BDEVNAME_SIZE];
spin_lock(&sb_lock);
restart:
list_for_each_entry(sb, &super_blocks, s_list) {
list_for_each_entry_safe(sb, n, &super_blocks, s_list) {
if (list_empty(&sb->s_instances))
continue;
sb->s_count++;
@@ -578,8 +577,6 @@ restart:
bdevname(sb->s_bdev, b));
up_read(&sb->s_umount);
spin_lock(&sb_lock);
if (__put_super_and_need_restart(sb))
goto restart;
}
spin_unlock(&sb_lock);
kfree(work);