summaryrefslogtreecommitdiff
path: root/fs/super.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2010-03-23 00:09:33 (GMT)
committerAl Viro <viro@zeniv.linux.org.uk>2010-05-21 22:31:15 (GMT)
commit6754af64641e8224c281ee5714e012e3ed41f701 (patch)
tree248a8c01aae46f98505d8c196393fae629f9691a /fs/super.c
parent8edd64bd6089e21f47dcdebb14b598b713213ddc (diff)
downloadlinux-6754af64641e8224c281ee5714e012e3ed41f701.tar.xz
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.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/super.c b/fs/super.c
index ba99524..ccb2b5f 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -395,11 +395,10 @@ EXPORT_SYMBOL(drop_super);
*/
void sync_supers(void)
{
- struct super_block *sb;
+ struct super_block *sb, *n;
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;
if (sb->s_op->write_super && sb->s_dirt) {
@@ -412,8 +411,7 @@ restart:
up_read(&sb->s_umount);
spin_lock(&sb_lock);
- if (__put_super_and_need_restart(sb))
- goto restart;
+ __put_super(sb);
}
}
spin_unlock(&sb_lock);