]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - mm/nommu.c
memcg: fix build warning and avoid checking for mem != null again and again
[karo-tx-linux.git] / mm / nommu.c
index 809998aa7b509dd072862def05f420a14e1185cf..b571ef707428c5e171fa27b7fc09d0212018c5df 100644 (file)
@@ -66,7 +66,7 @@ struct percpu_counter vm_committed_as;
 int sysctl_overcommit_memory = OVERCOMMIT_GUESS; /* heuristic overcommit */
 int sysctl_overcommit_ratio = 50; /* default is 50% */
 int sysctl_max_map_count = DEFAULT_MAX_MAP_COUNT;
-int sysctl_nr_trim_pages = 1; /* page trimming behaviour */
+int sysctl_nr_trim_pages = CONFIG_NOMMU_INITIAL_TRIM_EXCESS;
 int heap_stack_gap = 0;
 
 atomic_long_t mmap_pages_allocated;
@@ -515,8 +515,6 @@ static void add_nommu_region(struct vm_region *region)
 
        validate_nommu_regions();
 
-       BUG_ON(region->vm_start & ~PAGE_MASK);
-
        parent = NULL;
        p = &nommu_region_tree.rb_node;
        while (*p) {