summaryrefslogtreecommitdiffstats
path: root/mm/zsmalloc.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-09-24 19:10:23 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-09-24 19:10:23 -0400
commit9c9fa97a8edbc3668dfc7a25de516e80c146e86f (patch)
tree2dc0e90203796a4b346ce190f9521c3294104058 /mm/zsmalloc.c
parent5184d449600f501a8688069f35c138c6b3bf8b94 (diff)
parent2b38d01b4de8b1bbda7f5f7e91252609557635fc (diff)
Merge branch 'akpm' (patches from Andrew)
Merge updates from Andrew Morton: - a few hot fixes - ocfs2 updates - almost all of -mm (slab-generic, slab, slub, kmemleak, kasan, cleanups, debug, pagecache, memcg, gup, pagemap, memory-hotplug, sparsemem, vmalloc, initialization, z3fold, compaction, mempolicy, oom-kill, hugetlb, migration, thp, mmap, madvise, shmem, zswap, zsmalloc) * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (132 commits) mm/zsmalloc.c: fix a -Wunused-function warning zswap: do not map same object twice zswap: use movable memory if zpool support allocate movable memory zpool: add malloc_support_movable to zpool_driver shmem: fix obsolete comment in shmem_getpage_gfp() mm/madvise: reduce code duplication in error handling paths mm: mmap: increase sockets maximum memory size pgoff for 32bits mm/mmap.c: refine find_vma_prev() with rb_last() riscv: make mmap allocation top-down by default mips: use generic mmap top-down layout and brk randomization mips: replace arch specific way to determine 32bit task with generic version mips: adjust brk randomization offset to fit generic version mips: use STACK_TOP when computing mmap base address mips: properly account for stack randomization and stack guard gap arm: use generic mmap top-down layout and brk randomization arm: use STACK_TOP when computing mmap base address arm: properly account for stack randomization and stack guard gap arm64, mm: make randomization selected by generic topdown mmap layout arm64, mm: move generic mmap layout functions to mm arm64: consider stack randomization for mmap base only when necessary ...
Diffstat (limited to 'mm/zsmalloc.c')
-rw-r--r--mm/zsmalloc.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index e98bb6ab4f7e..2b2b9aae8a3c 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -443,15 +443,16 @@ static u64 zs_zpool_total_size(void *pool)
443} 443}
444 444
445static struct zpool_driver zs_zpool_driver = { 445static struct zpool_driver zs_zpool_driver = {
446 .type = "zsmalloc", 446 .type = "zsmalloc",
447 .owner = THIS_MODULE, 447 .owner = THIS_MODULE,
448 .create = zs_zpool_create, 448 .create = zs_zpool_create,
449 .destroy = zs_zpool_destroy, 449 .destroy = zs_zpool_destroy,
450 .malloc = zs_zpool_malloc, 450 .malloc_support_movable = true,
451 .free = zs_zpool_free, 451 .malloc = zs_zpool_malloc,
452 .map = zs_zpool_map, 452 .free = zs_zpool_free,
453 .unmap = zs_zpool_unmap, 453 .map = zs_zpool_map,
454 .total_size = zs_zpool_total_size, 454 .unmap = zs_zpool_unmap,
455 .total_size = zs_zpool_total_size,
455}; 456};
456 457
457MODULE_ALIAS("zpool-zsmalloc"); 458MODULE_ALIAS("zpool-zsmalloc");
@@ -476,10 +477,6 @@ static inline int get_zspage_inuse(struct zspage *zspage)
476 return zspage->inuse; 477 return zspage->inuse;
477} 478}
478 479
479static inline void set_zspage_inuse(struct zspage *zspage, int val)
480{
481 zspage->inuse = val;
482}
483 480
484static inline void mod_zspage_inuse(struct zspage *zspage, int val) 481static inline void mod_zspage_inuse(struct zspage *zspage, int val)
485{ 482{