diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-27 00:32:40 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-27 00:32:40 -0400 |
commit | e12fab28df1d7ae9369839a3af260a41447a5e79 (patch) | |
tree | 2f638674612075002fb6cc5ad1201c701fe4c741 /mm | |
parent | 478a1469a7d27fe6b2f85fc801ecdeb8afc836e6 (diff) | |
parent | bbccb9c7bbeb6c78eb467c191c97360160f13704 (diff) |
Merge branch 'akpm' (patches from Andrew)
Merge fixes from Andrew Morton:
"10 fixes"
* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
drivers/pinctrl/intel/pinctrl-baytrail.c: fix build with gcc-4.4
update "mm/zsmalloc: don't fail if can't create debugfs info"
dma-debug: avoid spinlock recursion when disabling dma-debug
mm: oom_reaper: remove some bloat
memcg: fix mem_cgroup_out_of_memory() return value.
ocfs2: fix improper handling of return errno
mm: slub: remove unused virt_to_obj()
mm: kasan: remove unused 'reserved' field from struct kasan_alloc_meta
mm: make CONFIG_DEFERRED_STRUCT_PAGE_INIT depends on !FLATMEM explicitly
seqlock: fix raw_read_seqcount_latch()
Diffstat (limited to 'mm')
-rw-r--r-- | mm/Kconfig | 1 | ||||
-rw-r--r-- | mm/kasan/kasan.h | 1 | ||||
-rw-r--r-- | mm/memcontrol.c | 2 | ||||
-rw-r--r-- | mm/zsmalloc.c | 35 |
4 files changed, 19 insertions, 20 deletions
diff --git a/mm/Kconfig b/mm/Kconfig index 2664c118b5d2..22fa8189e4fc 100644 --- a/mm/Kconfig +++ b/mm/Kconfig | |||
@@ -649,6 +649,7 @@ config DEFERRED_STRUCT_PAGE_INIT | |||
649 | default n | 649 | default n |
650 | depends on ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INIT | 650 | depends on ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INIT |
651 | depends on MEMORY_HOTPLUG | 651 | depends on MEMORY_HOTPLUG |
652 | depends on !FLATMEM | ||
652 | help | 653 | help |
653 | Ordinarily all struct pages are initialised during early boot in a | 654 | Ordinarily all struct pages are initialised during early boot in a |
654 | single thread. On very large machines this can take a considerable | 655 | single thread. On very large machines this can take a considerable |
diff --git a/mm/kasan/kasan.h b/mm/kasan/kasan.h index 7f7ac51d7faf..fb87923552ef 100644 --- a/mm/kasan/kasan.h +++ b/mm/kasan/kasan.h | |||
@@ -77,7 +77,6 @@ struct kasan_alloc_meta { | |||
77 | struct kasan_track track; | 77 | struct kasan_track track; |
78 | u32 state : 2; /* enum kasan_state */ | 78 | u32 state : 2; /* enum kasan_state */ |
79 | u32 alloc_size : 30; | 79 | u32 alloc_size : 30; |
80 | u32 reserved; | ||
81 | }; | 80 | }; |
82 | 81 | ||
83 | struct qlist_node { | 82 | struct qlist_node { |
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index cf428d7b9a03..f6477a9dbe7a 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -1302,6 +1302,8 @@ static bool mem_cgroup_out_of_memory(struct mem_cgroup *memcg, gfp_t gfp_mask, | |||
1302 | mem_cgroup_iter_break(memcg, iter); | 1302 | mem_cgroup_iter_break(memcg, iter); |
1303 | if (chosen) | 1303 | if (chosen) |
1304 | put_task_struct(chosen); | 1304 | put_task_struct(chosen); |
1305 | /* Set a dummy value to return "true". */ | ||
1306 | chosen = (void *) 1; | ||
1305 | goto unlock; | 1307 | goto unlock; |
1306 | case OOM_SCAN_OK: | 1308 | case OOM_SCAN_OK: |
1307 | break; | 1309 | break; |
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index 72698db958e7..b6d4f258cb53 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c | |||
@@ -45,6 +45,8 @@ | |||
45 | * | 45 | * |
46 | */ | 46 | */ |
47 | 47 | ||
48 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
49 | |||
48 | #include <linux/module.h> | 50 | #include <linux/module.h> |
49 | #include <linux/kernel.h> | 51 | #include <linux/kernel.h> |
50 | #include <linux/sched.h> | 52 | #include <linux/sched.h> |
@@ -483,16 +485,16 @@ static inline unsigned long zs_stat_get(struct size_class *class, | |||
483 | 485 | ||
484 | #ifdef CONFIG_ZSMALLOC_STAT | 486 | #ifdef CONFIG_ZSMALLOC_STAT |
485 | 487 | ||
486 | static int __init zs_stat_init(void) | 488 | static void __init zs_stat_init(void) |
487 | { | 489 | { |
488 | if (!debugfs_initialized()) | 490 | if (!debugfs_initialized()) { |
489 | return -ENODEV; | 491 | pr_warn("debugfs not available, stat dir not created\n"); |
492 | return; | ||
493 | } | ||
490 | 494 | ||
491 | zs_stat_root = debugfs_create_dir("zsmalloc", NULL); | 495 | zs_stat_root = debugfs_create_dir("zsmalloc", NULL); |
492 | if (!zs_stat_root) | 496 | if (!zs_stat_root) |
493 | return -ENOMEM; | 497 | pr_warn("debugfs 'zsmalloc' stat dir creation failed\n"); |
494 | |||
495 | return 0; | ||
496 | } | 498 | } |
497 | 499 | ||
498 | static void __exit zs_stat_exit(void) | 500 | static void __exit zs_stat_exit(void) |
@@ -577,8 +579,10 @@ static void zs_pool_stat_create(struct zs_pool *pool, const char *name) | |||
577 | { | 579 | { |
578 | struct dentry *entry; | 580 | struct dentry *entry; |
579 | 581 | ||
580 | if (!zs_stat_root) | 582 | if (!zs_stat_root) { |
583 | pr_warn("no root stat dir, not creating <%s> stat dir\n", name); | ||
581 | return; | 584 | return; |
585 | } | ||
582 | 586 | ||
583 | entry = debugfs_create_dir(name, zs_stat_root); | 587 | entry = debugfs_create_dir(name, zs_stat_root); |
584 | if (!entry) { | 588 | if (!entry) { |
@@ -592,7 +596,8 @@ static void zs_pool_stat_create(struct zs_pool *pool, const char *name) | |||
592 | if (!entry) { | 596 | if (!entry) { |
593 | pr_warn("%s: debugfs file entry <%s> creation failed\n", | 597 | pr_warn("%s: debugfs file entry <%s> creation failed\n", |
594 | name, "classes"); | 598 | name, "classes"); |
595 | return; | 599 | debugfs_remove_recursive(pool->stat_dentry); |
600 | pool->stat_dentry = NULL; | ||
596 | } | 601 | } |
597 | } | 602 | } |
598 | 603 | ||
@@ -602,9 +607,8 @@ static void zs_pool_stat_destroy(struct zs_pool *pool) | |||
602 | } | 607 | } |
603 | 608 | ||
604 | #else /* CONFIG_ZSMALLOC_STAT */ | 609 | #else /* CONFIG_ZSMALLOC_STAT */ |
605 | static int __init zs_stat_init(void) | 610 | static void __init zs_stat_init(void) |
606 | { | 611 | { |
607 | return 0; | ||
608 | } | 612 | } |
609 | 613 | ||
610 | static void __exit zs_stat_exit(void) | 614 | static void __exit zs_stat_exit(void) |
@@ -2011,17 +2015,10 @@ static int __init zs_init(void) | |||
2011 | zpool_register_driver(&zs_zpool_driver); | 2015 | zpool_register_driver(&zs_zpool_driver); |
2012 | #endif | 2016 | #endif |
2013 | 2017 | ||
2014 | ret = zs_stat_init(); | 2018 | zs_stat_init(); |
2015 | if (ret) { | 2019 | |
2016 | pr_err("zs stat initialization failed\n"); | ||
2017 | goto stat_fail; | ||
2018 | } | ||
2019 | return 0; | 2020 | return 0; |
2020 | 2021 | ||
2021 | stat_fail: | ||
2022 | #ifdef CONFIG_ZPOOL | ||
2023 | zpool_unregister_driver(&zs_zpool_driver); | ||
2024 | #endif | ||
2025 | notifier_fail: | 2022 | notifier_fail: |
2026 | zs_unregister_cpu_notifier(); | 2023 | zs_unregister_cpu_notifier(); |
2027 | 2024 | ||