summaryrefslogtreecommitdiffstats
path: root/drivers/block/zram
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-04-11 19:14:51 +0200
committerAndrew Morton <akpm@linux-foundation.org>2023-04-19 01:29:58 +0200
commitffb0a9e66562083cc0fb0a93d2de85cecd23a0e8 (patch)
tree3851d344c236ca78dd5c8122103ec37ec1095e4c /drivers/block/zram
parentzram: don't use highmem for the bounce buffer in zram_bvec_{read,write} (diff)
downloadlinux-ffb0a9e66562083cc0fb0a93d2de85cecd23a0e8.tar.xz
linux-ffb0a9e66562083cc0fb0a93d2de85cecd23a0e8.zip
zram: rename __zram_bvec_read to zram_read_page
__zram_bvec_read doesn't get passed a bvec, but always read a whole page. Rename it to make the usage more clear. Link: https://lkml.kernel.org/r/20230411171459.567614-10-hch@lst.de Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org> Acked-by: Minchan Kim <minchan@kernel.org> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'drivers/block/zram')
-rw-r--r--drivers/block/zram/zram_drv.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 0182316b2a90..414343b46ade 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -1397,8 +1397,8 @@ static int zram_read_from_zspool(struct zram *zram, struct page *page,
return ret;
}
-static int __zram_bvec_read(struct zram *zram, struct page *page, u32 index,
- struct bio *bio, bool partial_io)
+static int zram_read_page(struct zram *zram, struct page *page, u32 index,
+ struct bio *bio, bool partial_io)
{
int ret;
@@ -1436,7 +1436,7 @@ static int zram_bvec_read(struct zram *zram, struct bio_vec *bvec,
return -ENOMEM;
}
- ret = __zram_bvec_read(zram, page, index, bio, is_partial_io(bvec));
+ ret = zram_read_page(zram, page, index, bio, is_partial_io(bvec));
if (unlikely(ret))
goto out;
@@ -1593,7 +1593,7 @@ static int zram_bvec_write(struct zram *zram, struct bio_vec *bvec,
if (!page)
return -ENOMEM;
- ret = __zram_bvec_read(zram, page, index, bio, true);
+ ret = zram_read_page(zram, page, index, bio, true);
if (ret)
goto out;