diff options
Diffstat (limited to 'fs/reiserfs')
-rw-r--r-- | fs/reiserfs/super.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index f0ab5c94139c..9822fa15118b 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c | |||
@@ -158,6 +158,7 @@ static int finish_unfinished(struct super_block *s) | |||
158 | #ifdef CONFIG_QUOTA | 158 | #ifdef CONFIG_QUOTA |
159 | int i; | 159 | int i; |
160 | int ms_active_set; | 160 | int ms_active_set; |
161 | int quota_enabled[MAXQUOTAS]; | ||
161 | #endif | 162 | #endif |
162 | 163 | ||
163 | /* compose key to look for "save" links */ | 164 | /* compose key to look for "save" links */ |
@@ -179,8 +180,15 @@ static int finish_unfinished(struct super_block *s) | |||
179 | } | 180 | } |
180 | /* Turn on quotas so that they are updated correctly */ | 181 | /* Turn on quotas so that they are updated correctly */ |
181 | for (i = 0; i < MAXQUOTAS; i++) { | 182 | for (i = 0; i < MAXQUOTAS; i++) { |
183 | quota_enabled[i] = 1; | ||
182 | if (REISERFS_SB(s)->s_qf_names[i]) { | 184 | if (REISERFS_SB(s)->s_qf_names[i]) { |
183 | int ret = reiserfs_quota_on_mount(s, i); | 185 | int ret; |
186 | |||
187 | if (sb_has_quota_active(s, i)) { | ||
188 | quota_enabled[i] = 0; | ||
189 | continue; | ||
190 | } | ||
191 | ret = reiserfs_quota_on_mount(s, i); | ||
184 | if (ret < 0) | 192 | if (ret < 0) |
185 | reiserfs_warning(s, "reiserfs-2500", | 193 | reiserfs_warning(s, "reiserfs-2500", |
186 | "cannot turn on journaled " | 194 | "cannot turn on journaled " |
@@ -304,7 +312,7 @@ static int finish_unfinished(struct super_block *s) | |||
304 | #ifdef CONFIG_QUOTA | 312 | #ifdef CONFIG_QUOTA |
305 | /* Turn quotas off */ | 313 | /* Turn quotas off */ |
306 | for (i = 0; i < MAXQUOTAS; i++) { | 314 | for (i = 0; i < MAXQUOTAS; i++) { |
307 | if (sb_dqopt(s)->files[i]) | 315 | if (sb_dqopt(s)->files[i] && quota_enabled[i]) |
308 | dquot_quota_off(s, i); | 316 | dquot_quota_off(s, i); |
309 | } | 317 | } |
310 | if (ms_active_set) | 318 | if (ms_active_set) |