summaryrefslogtreecommitdiffstats
path: root/fs/ext3/super.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2014-09-10 14:48:02 -0400
committerJan Kara <jack@suse.cz>2014-09-17 05:59:11 -0400
commita93114e4688f8ff7aba3a1012f17cfadc054d08b (patch)
tree93eb3580a2fe2a49d2b11295fcfa2ee3f0dcb8ec /fs/ext3/super.c
parent6fb1ca92a6409a9d5b0696447cd4997bc9aaf5a2 (diff)
ext3: Don't use MAXQUOTAS value
MAXQUOTAS value defines maximum number of quota types VFS supports. This isn't necessarily the number of types ext3 supports and with addition of project quotas these two numbers stop matching. So make ext3 use its private definition. CC: linux-ext4@vger.kernel.org Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext3/super.c')
-rw-r--r--fs/ext3/super.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/ext3/super.c b/fs/ext3/super.c
index 622e88249024..b79f04bf72fc 100644
--- a/fs/ext3/super.c
+++ b/fs/ext3/super.c
@@ -441,7 +441,7 @@ static void ext3_put_super (struct super_block * sb)
441 percpu_counter_destroy(&sbi->s_dirs_counter); 441 percpu_counter_destroy(&sbi->s_dirs_counter);
442 brelse(sbi->s_sbh); 442 brelse(sbi->s_sbh);
443#ifdef CONFIG_QUOTA 443#ifdef CONFIG_QUOTA
444 for (i = 0; i < MAXQUOTAS; i++) 444 for (i = 0; i < EXT3_MAXQUOTAS; i++)
445 kfree(sbi->s_qf_names[i]); 445 kfree(sbi->s_qf_names[i]);
446#endif 446#endif
447 447
@@ -1555,7 +1555,7 @@ static void ext3_orphan_cleanup (struct super_block * sb,
1555 /* Needed for iput() to work correctly and not trash data */ 1555 /* Needed for iput() to work correctly and not trash data */
1556 sb->s_flags |= MS_ACTIVE; 1556 sb->s_flags |= MS_ACTIVE;
1557 /* Turn on quotas so that they are updated correctly */ 1557 /* Turn on quotas so that they are updated correctly */
1558 for (i = 0; i < MAXQUOTAS; i++) { 1558 for (i = 0; i < EXT3_MAXQUOTAS; i++) {
1559 if (EXT3_SB(sb)->s_qf_names[i]) { 1559 if (EXT3_SB(sb)->s_qf_names[i]) {
1560 int ret = ext3_quota_on_mount(sb, i); 1560 int ret = ext3_quota_on_mount(sb, i);
1561 if (ret < 0) 1561 if (ret < 0)
@@ -1606,7 +1606,7 @@ static void ext3_orphan_cleanup (struct super_block * sb,
1606 PLURAL(nr_truncates)); 1606 PLURAL(nr_truncates));
1607#ifdef CONFIG_QUOTA 1607#ifdef CONFIG_QUOTA
1608 /* Turn quotas off */ 1608 /* Turn quotas off */
1609 for (i = 0; i < MAXQUOTAS; i++) { 1609 for (i = 0; i < EXT3_MAXQUOTAS; i++) {
1610 if (sb_dqopt(sb)->files[i]) 1610 if (sb_dqopt(sb)->files[i])
1611 dquot_quota_off(sb, i); 1611 dquot_quota_off(sb, i);
1612 } 1612 }
@@ -2139,7 +2139,7 @@ failed_mount2:
2139 kfree(sbi->s_group_desc); 2139 kfree(sbi->s_group_desc);
2140failed_mount: 2140failed_mount:
2141#ifdef CONFIG_QUOTA 2141#ifdef CONFIG_QUOTA
2142 for (i = 0; i < MAXQUOTAS; i++) 2142 for (i = 0; i < EXT3_MAXQUOTAS; i++)
2143 kfree(sbi->s_qf_names[i]); 2143 kfree(sbi->s_qf_names[i]);
2144#endif 2144#endif
2145 ext3_blkdev_remove(sbi); 2145 ext3_blkdev_remove(sbi);
@@ -2659,7 +2659,7 @@ static int ext3_remount (struct super_block * sb, int * flags, char * data)
2659 old_opts.s_commit_interval = sbi->s_commit_interval; 2659 old_opts.s_commit_interval = sbi->s_commit_interval;
2660#ifdef CONFIG_QUOTA 2660#ifdef CONFIG_QUOTA
2661 old_opts.s_jquota_fmt = sbi->s_jquota_fmt; 2661 old_opts.s_jquota_fmt = sbi->s_jquota_fmt;
2662 for (i = 0; i < MAXQUOTAS; i++) 2662 for (i = 0; i < EXT3_MAXQUOTAS; i++)
2663 if (sbi->s_qf_names[i]) { 2663 if (sbi->s_qf_names[i]) {
2664 old_opts.s_qf_names[i] = kstrdup(sbi->s_qf_names[i], 2664 old_opts.s_qf_names[i] = kstrdup(sbi->s_qf_names[i],
2665 GFP_KERNEL); 2665 GFP_KERNEL);
@@ -2763,7 +2763,7 @@ static int ext3_remount (struct super_block * sb, int * flags, char * data)
2763 } 2763 }
2764#ifdef CONFIG_QUOTA 2764#ifdef CONFIG_QUOTA
2765 /* Release old quota file names */ 2765 /* Release old quota file names */
2766 for (i = 0; i < MAXQUOTAS; i++) 2766 for (i = 0; i < EXT3_MAXQUOTAS; i++)
2767 kfree(old_opts.s_qf_names[i]); 2767 kfree(old_opts.s_qf_names[i]);
2768#endif 2768#endif
2769 if (enable_quota) 2769 if (enable_quota)
@@ -2777,7 +2777,7 @@ restore_opts:
2777 sbi->s_commit_interval = old_opts.s_commit_interval; 2777 sbi->s_commit_interval = old_opts.s_commit_interval;
2778#ifdef CONFIG_QUOTA 2778#ifdef CONFIG_QUOTA
2779 sbi->s_jquota_fmt = old_opts.s_jquota_fmt; 2779 sbi->s_jquota_fmt = old_opts.s_jquota_fmt;
2780 for (i = 0; i < MAXQUOTAS; i++) { 2780 for (i = 0; i < EXT3_MAXQUOTAS; i++) {
2781 kfree(sbi->s_qf_names[i]); 2781 kfree(sbi->s_qf_names[i]);
2782 sbi->s_qf_names[i] = old_opts.s_qf_names[i]; 2782 sbi->s_qf_names[i] = old_opts.s_qf_names[i];
2783 } 2783 }