UPSTREAM: zram: use zram_free_page instead of open-coded
authorMinchan Kim <minchan@kernel.org>
Wed, 3 May 2017 21:55:53 +0000 (14:55 -0700)
committerivanmeler <i_ivan@windowslive.com>
Wed, 13 Apr 2022 21:13:21 +0000 (21:13 +0000)
commit32f507171ed1d3504057c1a0b6f36b1618191dec
tree6d49a5cd793b1d3dfad28e907a2aa7d5bd4da578
parent1003541918c5307ccc8487cb481b3b83f11ee143
UPSTREAM: zram: use zram_free_page instead of open-coded

The zram_free_page already handles NULL handle case and same page so use
it to reduce error probability.  (Acutaully, I made a mistake when I
handled same page feature)

Link: http://lkml.kernel.org/r/1492052365-16169-7-git-send-email-minchan@kernel.org
Signed-off-by: Minchan Kim <minchan@kernel.org>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 302128dce142d780417aa548bfd7ef4dfb89fa80)
Signed-off-by: Peter Kalauskas <peskal@google.com>
Bug: 112488418
Change-Id: Ie38c52dfb1959377936b7cd9158ad1b5a02219bd
drivers/block/zram/zram_drv.c