diff options
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, | |||
47 | 47 | ||
48 | static int quota_sync_all(int type) | 48 | static int quota_sync_all(int type) |
49 | { | 49 | { |
50 | struct super_block *sb; | 50 | struct super_block *sb, *n; |
51 | int ret; | 51 | int ret; |
52 | 52 | ||
53 | if (type >= MAXQUOTAS) | 53 | if (type >= MAXQUOTAS) |
@@ -57,8 +57,7 @@ static int quota_sync_all(int type) | |||
57 | return ret; | 57 | return ret; |
58 | 58 | ||
59 | spin_lock(&sb_lock); | 59 | spin_lock(&sb_lock); |
60 | restart: | 60 | list_for_each_entry_safe(sb, n, &super_blocks, s_list) { |
61 | list_for_each_entry(sb, &super_blocks, s_list) { | ||
62 | if (list_empty(&sb->s_instances)) | 61 | if (list_empty(&sb->s_instances)) |
63 | continue; | 62 | continue; |
64 | if (!sb->s_qcop || !sb->s_qcop->quota_sync) | 63 | if (!sb->s_qcop || !sb->s_qcop->quota_sync) |
@@ -71,8 +70,7 @@ restart: | |||
71 | sb->s_qcop->quota_sync(sb, type, 1); | 70 | sb->s_qcop->quota_sync(sb, type, 1); |
72 | up_read(&sb->s_umount); | 71 | up_read(&sb->s_umount); |
73 | spin_lock(&sb_lock); | 72 | spin_lock(&sb_lock); |
74 | if (__put_super_and_need_restart(sb)) | 73 | __put_super(sb); |
75 | goto restart; | ||
76 | } | 74 | } |
77 | spin_unlock(&sb_lock); | 75 | spin_unlock(&sb_lock); |
78 | 76 | ||