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/super.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/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 ba99524998f7..ccb2b5fa89bd 100644 --- a/fs/super.c +++ b/fs/super.c | |||
@@ -395,11 +395,10 @@ EXPORT_SYMBOL(drop_super); | |||
395 | */ | 395 | */ |
396 | void sync_supers(void) | 396 | void sync_supers(void) |
397 | { | 397 | { |
398 | struct super_block *sb; | 398 | struct super_block *sb, *n; |
399 | 399 | ||
400 | spin_lock(&sb_lock); | 400 | spin_lock(&sb_lock); |
401 | restart: | 401 | list_for_each_entry_safe(sb, n, &super_blocks, s_list) { |
402 | list_for_each_entry(sb, &super_blocks, s_list) { | ||
403 | if (list_empty(&sb->s_instances)) | 402 | if (list_empty(&sb->s_instances)) |
404 | continue; | 403 | continue; |
405 | if (sb->s_op->write_super && sb->s_dirt) { | 404 | if (sb->s_op->write_super && sb->s_dirt) { |
@@ -412,8 +411,7 @@ restart: | |||
412 | up_read(&sb->s_umount); | 411 | up_read(&sb->s_umount); |
413 | 412 | ||
414 | spin_lock(&sb_lock); | 413 | spin_lock(&sb_lock); |
415 | if (__put_super_and_need_restart(sb)) | 414 | __put_super(sb); |
416 | goto restart; | ||
417 | } | 415 | } |
418 | } | 416 | } |
419 | spin_unlock(&sb_lock); | 417 | spin_unlock(&sb_lock); |