ext4: use old percpu_counter_init() function signature
Theodore Ts'o [Thu, 22 Jan 2015 17:20:19 +0000 (12:20 -0500)]
Older kernels don't pass in a gfp_flags argument.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>

fs/ext4/extents_status.c
fs/ext4/super.c

index 8571a58..96f11da 100644 (file)
@@ -1205,10 +1205,10 @@ int ext4_es_register_shrinker(struct ext4_sb_info *sbi)
        sbi->s_es_stats.es_stats_cache_misses = 0;
        sbi->s_es_stats.es_stats_scan_time = 0;
        sbi->s_es_stats.es_stats_max_scan_time = 0;
-       err = percpu_counter_init(&sbi->s_es_stats.es_stats_all_cnt, 0, GFP_KERNEL);
+       err = percpu_counter_init(&sbi->s_es_stats.es_stats_all_cnt, 0);
        if (err)
                return err;
-       err = percpu_counter_init(&sbi->s_es_stats.es_stats_lru_cnt, 0, GFP_KERNEL);
+       err = percpu_counter_init(&sbi->s_es_stats.es_stats_lru_cnt, 0);
        if (err)
                goto err1;
 
index fbe80a6..26690d0 100644 (file)
@@ -4125,20 +4125,17 @@ no_journal:
        block = ext4_count_free_clusters(sb);
        ext4_free_blocks_count_set(sbi->s_es, 
                                   EXT4_C2B(sbi, block));
-       err = percpu_counter_init(&sbi->s_freeclusters_counter, block,
-                                 GFP_KERNEL);
+       err = percpu_counter_init(&sbi->s_freeclusters_counter, block);
        if (!err) {
                unsigned long freei = ext4_count_free_inodes(sb);
                sbi->s_es->s_free_inodes_count = cpu_to_le32(freei);
-               err = percpu_counter_init(&sbi->s_freeinodes_counter, freei,
-                                         GFP_KERNEL);
+               err = percpu_counter_init(&sbi->s_freeinodes_counter, freei);
        }
        if (!err)
                err = percpu_counter_init(&sbi->s_dirs_counter,
-                                         ext4_count_dirs(sb), GFP_KERNEL);
+                                         ext4_count_dirs(sb));
        if (!err)
-               err = percpu_counter_init(&sbi->s_dirtyclusters_counter, 0,
-                                         GFP_KERNEL);
+               err = percpu_counter_init(&sbi->s_dirtyclusters_counter, 0);
        if (err) {
                ext4_msg(sb, KERN_ERR, "insufficient memory");
                goto failed_mount6;