zram: pass gfp from zcomp frontend to backend
authorMinchan Kim <minchan@kernel.org>
Thu, 14 Jan 2016 23:22:32 +0000 (15:22 -0800)
committerDanny Wood <danwood76@gmail.com>
Tue, 14 Sep 2021 19:02:58 +0000 (20:02 +0100)
commitcd681c03c823c40d16c17b4f3d70ac837706eca3
treebdec44999bd1288986113ad6d9fa0bb4e3a9101c
parentce00e7b8cbba060a230a8fcb9d7bd8b6d8d3162c
zram: pass gfp from zcomp frontend to backend

Each zcomp backend uses own gfp flag but it's pointless because the
context they could be called is driven by upper layer(ie, zcomp
frontend).  As well, zcomp frondend could call them in different
context.  One context(ie, zram init part) is it should be better to make
sure successful allocation other context(ie, further stream allocation
part for accelarating I/O speed) is just optional so let's pass gfp down
from driver (ie, zcomp frontend) like normal MM convention.

[sergey.senozhatsky@gmail.com: add missing __vmalloc zero and highmem gfps]
Signed-off-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Change-Id: Ie60f5399a4ec8ad54a0cd7575977d79e6eda6e43
drivers/block/zram/zcomp.c
drivers/block/zram/zcomp.h
drivers/block/zram/zcomp_lz4.c
drivers/block/zram/zcomp_lzo.c