UPSTREAM: zram: rename zram_decompress_page to __zram_bvec_read
authorMinchan Kim <minchan@kernel.org>
Wed, 6 Sep 2017 23:19:50 +0000 (16:19 -0700)
committerivanmeler <i_ivan@windowslive.com>
Wed, 13 Apr 2022 21:13:24 +0000 (21:13 +0000)
zram_decompress_page naming is not proper because it doesn't decompress
if page was dedup hit or stored with compression.

Use more abstract term and consistent with write path function
__zram_bvec_write.

Link: http://lkml.kernel.org/r/1498459987-24562-4-git-send-email-minchan@kernel.org
Signed-off-by: Minchan Kim <minchan@kernel.org>
Cc: Juneho Choi <juno.choi@lge.com>
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 693dc1ce25b8c8fa33f930d47cd8f926eeb90812)
Signed-off-by: Peter Kalauskas <peskal@google.com>
Bug: 112488418
Change-Id: Ia7c948f4b78601458b7ebc23ab345d4bc0a8d4a8

drivers/block/zram/zram_drv.c

index 96c175bb476f2dfc6c95f12cb992d6fdcff7c6a4..9137eff24e6d559362d21240e117f4e287a53e3c 100644 (file)
@@ -517,7 +517,7 @@ static void zram_free_page(struct zram *zram, size_t index)
        zram_set_obj_size(zram, index, 0);
 }
 
-static int zram_decompress_page(struct zram *zram, struct page *page, u32 index)
+static int __zram_bvec_read(struct zram *zram, struct page *page, u32 index)
 {
        int ret;
        unsigned long handle;
@@ -569,7 +569,7 @@ static int zram_bvec_read(struct zram *zram, struct bio_vec *bvec,
                        return -ENOMEM;
        }
 
-       ret = zram_decompress_page(zram, page, index);
+       ret = __zram_bvec_read(zram, page, index);
        if (unlikely(ret))
                goto out;
 
@@ -717,7 +717,7 @@ static int zram_bvec_write(struct zram *zram, struct bio_vec *bvec,
                if (!page)
                        return -ENOMEM;
 
-               ret = zram_decompress_page(zram, page, index);
+               ret = __zram_bvec_read(zram, page, index);
                if (ret)
                        goto out;