@@ -822,7 +822,7 @@ static void ext4_put_super(struct super_block *sb)
822822 percpu_counter_destroy (& sbi -> s_dirtyclusters_counter );
823823 brelse (sbi -> s_sbh );
824824#ifdef CONFIG_QUOTA
825- for (i = 0 ; i < MAXQUOTAS ; i ++ )
825+ for (i = 0 ; i < EXT4_MAXQUOTAS ; i ++ )
826826 kfree (sbi -> s_qf_names [i ]);
827827#endif
828828
@@ -2207,7 +2207,7 @@ static void ext4_orphan_cleanup(struct super_block *sb,
22072207 /* Needed for iput() to work correctly and not trash data */
22082208 sb -> s_flags |= MS_ACTIVE ;
22092209 /* Turn on quotas so that they are updated correctly */
2210- for (i = 0 ; i < MAXQUOTAS ; i ++ ) {
2210+ for (i = 0 ; i < EXT4_MAXQUOTAS ; i ++ ) {
22112211 if (EXT4_SB (sb )-> s_qf_names [i ]) {
22122212 int ret = ext4_quota_on_mount (sb , i );
22132213 if (ret < 0 )
@@ -2263,7 +2263,7 @@ static void ext4_orphan_cleanup(struct super_block *sb,
22632263 PLURAL (nr_truncates ));
22642264#ifdef CONFIG_QUOTA
22652265 /* Turn quotas off */
2266- for (i = 0 ; i < MAXQUOTAS ; i ++ ) {
2266+ for (i = 0 ; i < EXT4_MAXQUOTAS ; i ++ ) {
22672267 if (sb_dqopt (sb )-> files [i ])
22682268 dquot_quota_off (sb , i );
22692269 }
@@ -4238,7 +4238,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
42384238 remove_proc_entry (sb -> s_id , ext4_proc_root );
42394239 }
42404240#ifdef CONFIG_QUOTA
4241- for (i = 0 ; i < MAXQUOTAS ; i ++ )
4241+ for (i = 0 ; i < EXT4_MAXQUOTAS ; i ++ )
42424242 kfree (sbi -> s_qf_names [i ]);
42434243#endif
42444244 ext4_blkdev_remove (sbi );
@@ -4765,7 +4765,7 @@ struct ext4_mount_options {
47654765 u32 s_min_batch_time , s_max_batch_time ;
47664766#ifdef CONFIG_QUOTA
47674767 int s_jquota_fmt ;
4768- char * s_qf_names [MAXQUOTAS ];
4768+ char * s_qf_names [EXT4_MAXQUOTAS ];
47694769#endif
47704770};
47714771
@@ -4795,7 +4795,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
47954795 old_opts .s_max_batch_time = sbi -> s_max_batch_time ;
47964796#ifdef CONFIG_QUOTA
47974797 old_opts .s_jquota_fmt = sbi -> s_jquota_fmt ;
4798- for (i = 0 ; i < MAXQUOTAS ; i ++ )
4798+ for (i = 0 ; i < EXT4_MAXQUOTAS ; i ++ )
47994799 if (sbi -> s_qf_names [i ]) {
48004800 old_opts .s_qf_names [i ] = kstrdup (sbi -> s_qf_names [i ],
48014801 GFP_KERNEL );
@@ -4956,7 +4956,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
49564956
49574957#ifdef CONFIG_QUOTA
49584958 /* Release old quota file names */
4959- for (i = 0 ; i < MAXQUOTAS ; i ++ )
4959+ for (i = 0 ; i < EXT4_MAXQUOTAS ; i ++ )
49604960 kfree (old_opts .s_qf_names [i ]);
49614961 if (enable_quota ) {
49624962 if (sb_any_quota_suspended (sb ))
@@ -4985,7 +4985,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
49854985 sbi -> s_max_batch_time = old_opts .s_max_batch_time ;
49864986#ifdef CONFIG_QUOTA
49874987 sbi -> s_jquota_fmt = old_opts .s_jquota_fmt ;
4988- for (i = 0 ; i < MAXQUOTAS ; i ++ ) {
4988+ for (i = 0 ; i < EXT4_MAXQUOTAS ; i ++ ) {
49894989 kfree (sbi -> s_qf_names [i ]);
49904990 sbi -> s_qf_names [i ] = old_opts .s_qf_names [i ];
49914991 }
@@ -5188,7 +5188,7 @@ static int ext4_quota_enable(struct super_block *sb, int type, int format_id,
51885188{
51895189 int err ;
51905190 struct inode * qf_inode ;
5191- unsigned long qf_inums [MAXQUOTAS ] = {
5191+ unsigned long qf_inums [EXT4_MAXQUOTAS ] = {
51925192 le32_to_cpu (EXT4_SB (sb )-> s_es -> s_usr_quota_inum ),
51935193 le32_to_cpu (EXT4_SB (sb )-> s_es -> s_grp_quota_inum )
51945194 };
@@ -5216,13 +5216,13 @@ static int ext4_quota_enable(struct super_block *sb, int type, int format_id,
52165216static int ext4_enable_quotas (struct super_block * sb )
52175217{
52185218 int type , err = 0 ;
5219- unsigned long qf_inums [MAXQUOTAS ] = {
5219+ unsigned long qf_inums [EXT4_MAXQUOTAS ] = {
52205220 le32_to_cpu (EXT4_SB (sb )-> s_es -> s_usr_quota_inum ),
52215221 le32_to_cpu (EXT4_SB (sb )-> s_es -> s_grp_quota_inum )
52225222 };
52235223
52245224 sb_dqopt (sb )-> flags |= DQUOT_QUOTA_SYS_FILE ;
5225- for (type = 0 ; type < MAXQUOTAS ; type ++ ) {
5225+ for (type = 0 ; type < EXT4_MAXQUOTAS ; type ++ ) {
52265226 if (qf_inums [type ]) {
52275227 err = ext4_quota_enable (sb , type , QFMT_VFS_V1 ,
52285228 DQUOT_USAGE_ENABLED );
0 commit comments