mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
Convert simple loops over superblocks to list_for_each_entry_safe
Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
8edd64bd60
commit
6754af6464
4 changed files with 11 additions and 20 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue