diff options
author | Minchan Kim <minchan@kernel.org> | 2016-01-15 00:22:32 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-15 20:40:51 +0100 |
commit | 75d8947a36d0c9aedd69118d1f14bf424005c7c2 (patch) | |
tree | 2fb49d36e4db0591ebd3fe42101379f9aa9b9c90 /drivers/block/zram/zcomp.h | |
parent | zram: try vmalloc() after kmalloc() (diff) | |
download | linux-75d8947a36d0c9aedd69118d1f14bf424005c7c2.tar.xz linux-75d8947a36d0c9aedd69118d1f14bf424005c7c2.zip |
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>
Diffstat (limited to 'drivers/block/zram/zcomp.h')
-rw-r--r-- | drivers/block/zram/zcomp.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/zram/zcomp.h b/drivers/block/zram/zcomp.h index 46e2b9f8f1f0..b7d2a4bcae54 100644 --- a/drivers/block/zram/zcomp.h +++ b/drivers/block/zram/zcomp.h @@ -33,7 +33,7 @@ struct zcomp_backend { int (*decompress)(const unsigned char *src, size_t src_len, unsigned char *dst); - void *(*create)(void); + void *(*create)(gfp_t flags); void (*destroy)(void *private); const char *name; |