aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/zram/zram_drv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/zram/zram_drv.c')
-rw-r--r--drivers/block/zram/zram_drv.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 399cad7daae7..d58a359a6622 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -774,18 +774,18 @@ struct zram_work {
774 struct zram *zram; 774 struct zram *zram;
775 unsigned long entry; 775 unsigned long entry;
776 struct bio *bio; 776 struct bio *bio;
777 struct bio_vec bvec;
777}; 778};
778 779
779#if PAGE_SIZE != 4096 780#if PAGE_SIZE != 4096
780static void zram_sync_read(struct work_struct *work) 781static void zram_sync_read(struct work_struct *work)
781{ 782{
782 struct bio_vec bvec;
783 struct zram_work *zw = container_of(work, struct zram_work, work); 783 struct zram_work *zw = container_of(work, struct zram_work, work);
784 struct zram *zram = zw->zram; 784 struct zram *zram = zw->zram;
785 unsigned long entry = zw->entry; 785 unsigned long entry = zw->entry;
786 struct bio *bio = zw->bio; 786 struct bio *bio = zw->bio;
787 787
788 read_from_bdev_async(zram, &bvec, entry, bio); 788 read_from_bdev_async(zram, &zw->bvec, entry, bio);
789} 789}
790 790
791/* 791/*
@@ -798,6 +798,7 @@ static int read_from_bdev_sync(struct zram *zram, struct bio_vec *bvec,
798{ 798{
799 struct zram_work work; 799 struct zram_work work;
800 800
801 work.bvec = *bvec;
801 work.zram = zram; 802 work.zram = zram;
802 work.entry = entry; 803 work.entry = entry;
803 work.bio = bio; 804 work.bio = bio;