summaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorMinchan Kim <minchan@kernel.org>2017-09-06 16:19:50 -0700
committerAmit Pundir <amit.pundir@linaro.org>2018-10-04 14:16:25 +0530
commit1e9f94054587ba4c24d7c5996be24935e957d28e (patch)
tree770957c96ee3beac875f466eb3d153cd29c93b47 /drivers/block
parenteda1379b4d3cc9736370dcc8f8338f0af6853d75 (diff)
UPSTREAM: zram: rename zram_decompress_page to __zram_bvec_read
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 Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/zram/zram_drv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 96c175bb476f..9137eff24e6d 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -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;