UPSTREAM: zram/zcomp: do not zero out zcomp private pages
authorSergey Senozhatsky <sergey.senozhatsky@gmail.com>
Thu, 14 Jan 2016 23:22:35 +0000 (15:22 -0800)
committerivanmeler <i_ivan@windowslive.com>
Wed, 13 Apr 2022 21:13:14 +0000 (21:13 +0000)
commitcc48459f83e7e0ff7f5ba5f2748e0aeb0ea55e93
tree923d4f7e88bdb78e2fa014174af87f4a576e825b
parentdcfde32d25bb5dab19ba2d526e58e4fe6f4ac583
UPSTREAM: zram/zcomp: do not zero out zcomp private pages

Do not __GFP_ZERO allocated zcomp ->private pages.  We keep allocated
streams around and use them for read/write requests, so we supply a
zeroed out ->private to compression algorithm as a scratch buffer only
once -- the first time we use that stream.  For the rest of IO requests
served by this stream ->private usually contains some temporarily data
from the previous requests.

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit e02d238c9852a91b30da9ea32ce36d1416cdc683)
Signed-off-by: Peter Kalauskas <peskal@google.com>
Bug: 112488418
Change-Id: I911832da703f596998a4139d6033ef1564848c9e
drivers/block/zram/zcomp_lz4.c
drivers/block/zram/zcomp_lzo.c