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/quota | |
parent | 8edd64bd6089e21f47dcdebb14b598b713213ddc (diff) | |
download | linux-6754af64641e8224c281ee5714e012e3ed41f701.tar.bz2 |
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/quota')
-rw-r--r-- | fs/quota/quota.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/quota/quota.c b/fs/quota/quota.c index 4669e7e639bd..2196f8b07c1f 100644 --- a/fs/quota/quota.c +++ b/fs/quota/quota.c @@ -47,7 +47,7 @@ static int check_quotactl_permission(struct super_block *sb, int type, int cmd, static int quota_sync_all(int type) { - struct super_block *sb; + struct super_block *sb, *n; int ret; if (type >= MAXQUOTAS) @@ -57,8 +57,7 @@ static int quota_sync_all(int type) return ret; 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_qcop || !sb->s_qcop->quota_sync) @@ -71,8 +70,7 @@ restart: sb->s_qcop->quota_sync(sb, type, 1); 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); |