diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-03-06 13:31:36 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-03-06 13:31:36 -0500 |
commit | 8dcd175bc3d50b78413c56d5b17d4bddd77412ef (patch) | |
tree | 2c2fb25759b43f2e73830f07ef3b444d76825280 /mm/slab_common.c | |
parent | afe6fe7036c6efdcb46cabc64bec9b6e4a005210 (diff) | |
parent | fff04900ea79915939ef6a3aad78fca6511a3034 (diff) |
Merge branch 'akpm' (patches from Andrew)
Merge misc updates from Andrew Morton:
- a few misc things
- ocfs2 updates
- most of MM
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (159 commits)
tools/testing/selftests/proc/proc-self-syscall.c: remove duplicate include
proc: more robust bulk read test
proc: test /proc/*/maps, smaps, smaps_rollup, statm
proc: use seq_puts() everywhere
proc: read kernel cpu stat pointer once
proc: remove unused argument in proc_pid_lookup()
fs/proc/thread_self.c: code cleanup for proc_setup_thread_self()
fs/proc/self.c: code cleanup for proc_setup_self()
proc: return exit code 4 for skipped tests
mm,mremap: bail out earlier in mremap_to under map pressure
mm/sparse: fix a bad comparison
mm/memory.c: do_fault: avoid usage of stale vm_area_struct
writeback: fix inode cgroup switching comment
mm/huge_memory.c: fix "orig_pud" set but not used
mm/hotplug: fix an imbalance with DEBUG_PAGEALLOC
mm/memcontrol.c: fix bad line in comment
mm/cma.c: cma_declare_contiguous: correct err handling
mm/page_ext.c: fix an imbalance with kmemleak
mm/compaction: pass pgdat to too_many_isolated() instead of zone
mm: remove zone_lru_lock() function, access ->lru_lock directly
...
Diffstat (limited to 'mm/slab_common.c')
-rw-r--r-- | mm/slab_common.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/mm/slab_common.c b/mm/slab_common.c index f9d89c1b5977..03eeb8b7b4b1 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c | |||
@@ -939,6 +939,8 @@ EXPORT_SYMBOL(kmem_cache_destroy); | |||
939 | * | 939 | * |
940 | * Releases as many slabs as possible for a cache. | 940 | * Releases as many slabs as possible for a cache. |
941 | * To help debugging, a zero exit status indicates all slabs were released. | 941 | * To help debugging, a zero exit status indicates all slabs were released. |
942 | * | ||
943 | * Return: %0 if all slabs were released, non-zero otherwise | ||
942 | */ | 944 | */ |
943 | int kmem_cache_shrink(struct kmem_cache *cachep) | 945 | int kmem_cache_shrink(struct kmem_cache *cachep) |
944 | { | 946 | { |
@@ -1425,7 +1427,7 @@ void dump_unreclaimable_slab(void) | |||
1425 | #if defined(CONFIG_MEMCG) | 1427 | #if defined(CONFIG_MEMCG) |
1426 | void *memcg_slab_start(struct seq_file *m, loff_t *pos) | 1428 | void *memcg_slab_start(struct seq_file *m, loff_t *pos) |
1427 | { | 1429 | { |
1428 | struct mem_cgroup *memcg = mem_cgroup_from_css(seq_css(m)); | 1430 | struct mem_cgroup *memcg = mem_cgroup_from_seq(m); |
1429 | 1431 | ||
1430 | mutex_lock(&slab_mutex); | 1432 | mutex_lock(&slab_mutex); |
1431 | return seq_list_start(&memcg->kmem_caches, *pos); | 1433 | return seq_list_start(&memcg->kmem_caches, *pos); |
@@ -1433,7 +1435,7 @@ void *memcg_slab_start(struct seq_file *m, loff_t *pos) | |||
1433 | 1435 | ||
1434 | void *memcg_slab_next(struct seq_file *m, void *p, loff_t *pos) | 1436 | void *memcg_slab_next(struct seq_file *m, void *p, loff_t *pos) |
1435 | { | 1437 | { |
1436 | struct mem_cgroup *memcg = mem_cgroup_from_css(seq_css(m)); | 1438 | struct mem_cgroup *memcg = mem_cgroup_from_seq(m); |
1437 | 1439 | ||
1438 | return seq_list_next(p, &memcg->kmem_caches, pos); | 1440 | return seq_list_next(p, &memcg->kmem_caches, pos); |
1439 | } | 1441 | } |
@@ -1447,7 +1449,7 @@ int memcg_slab_show(struct seq_file *m, void *p) | |||
1447 | { | 1449 | { |
1448 | struct kmem_cache *s = list_entry(p, struct kmem_cache, | 1450 | struct kmem_cache *s = list_entry(p, struct kmem_cache, |
1449 | memcg_params.kmem_caches_node); | 1451 | memcg_params.kmem_caches_node); |
1450 | struct mem_cgroup *memcg = mem_cgroup_from_css(seq_css(m)); | 1452 | struct mem_cgroup *memcg = mem_cgroup_from_seq(m); |
1451 | 1453 | ||
1452 | if (p == memcg->kmem_caches.next) | 1454 | if (p == memcg->kmem_caches.next) |
1453 | print_slabinfo_header(m); | 1455 | print_slabinfo_header(m); |
@@ -1528,6 +1530,8 @@ static __always_inline void *__do_krealloc(const void *p, size_t new_size, | |||
1528 | * This function is like krealloc() except it never frees the originally | 1530 | * This function is like krealloc() except it never frees the originally |
1529 | * allocated buffer. Use this if you don't want to free the buffer immediately | 1531 | * allocated buffer. Use this if you don't want to free the buffer immediately |
1530 | * like, for example, with RCU. | 1532 | * like, for example, with RCU. |
1533 | * | ||
1534 | * Return: pointer to the allocated memory or %NULL in case of error | ||
1531 | */ | 1535 | */ |
1532 | void *__krealloc(const void *p, size_t new_size, gfp_t flags) | 1536 | void *__krealloc(const void *p, size_t new_size, gfp_t flags) |
1533 | { | 1537 | { |
@@ -1549,6 +1553,8 @@ EXPORT_SYMBOL(__krealloc); | |||
1549 | * lesser of the new and old sizes. If @p is %NULL, krealloc() | 1553 | * lesser of the new and old sizes. If @p is %NULL, krealloc() |
1550 | * behaves exactly like kmalloc(). If @new_size is 0 and @p is not a | 1554 | * behaves exactly like kmalloc(). If @new_size is 0 and @p is not a |
1551 | * %NULL pointer, the object pointed to is freed. | 1555 | * %NULL pointer, the object pointed to is freed. |
1556 | * | ||
1557 | * Return: pointer to the allocated memory or %NULL in case of error | ||
1552 | */ | 1558 | */ |
1553 | void *krealloc(const void *p, size_t new_size, gfp_t flags) | 1559 | void *krealloc(const void *p, size_t new_size, gfp_t flags) |
1554 | { | 1560 | { |