summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorMinchan Kim <minchan@kernel.org>2021-03-13 08:08:41 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2021-03-13 22:27:31 +0300
commit2766f1821600cc7562bae2128ad0b163f744c5d9 (patch)
treed3ee53d226db8a30707d94714c488e358a440785 /init
parent57e0076e6575a7b7cef620a0bd2ee2549ef77818 (diff)
downloadlinux-2766f1821600cc7562bae2128ad0b163f744c5d9.tar.xz
zram: fix broken page writeback
commit 0d8359620d9b ("zram: support page writeback") introduced two problems. It overwrites writeback_store's return value as kstrtol's return value, which makes return value zero so user could see zero as return value of write syscall even though it wrote data successfully. It also breaks index value in the loop in that it doesn't increase the index any longer. It means it can write only first starting block index so user couldn't write all idle pages in the zram so lose memory saving chance. This patch fixes those issues. Link: https://lkml.kernel.org/r/20210312173949.2197662-2-minchan@kernel.org Fixes: 0d8359620d9b("zram: support page writeback") Signed-off-by: Minchan Kim <minchan@kernel.org> Reported-by: Amos Bianchi <amosbianchi@google.com> Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Cc: John Dias <joaodias@google.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions