flush_dcache_page(page);
}
-static int zram_read(struct zram *zram, struct bio *bio)
+static void zram_read(struct zram *zram, struct bio *bio)
{
int i;
if (unlikely(!zram->init_done)) {
bio_endio(bio, -ENXIO);
- return 0;
+ return;
}
zram_stat64_inc(zram, &zram->stats.num_reads);
set_bit(BIO_UPTODATE, &bio->bi_flags);
bio_endio(bio, 0);
- return 0;
+ return;
out:
bio_io_error(bio);
- return 0;
}
-static int zram_write(struct zram *zram, struct bio *bio)
+static void zram_write(struct zram *zram, struct bio *bio)
{
int i, ret;
u32 index;
set_bit(BIO_UPTODATE, &bio->bi_flags);
bio_endio(bio, 0);
- return 0;
+ return;
out:
bio_io_error(bio);
- return 0;
}
/*
*/
static int zram_make_request(struct request_queue *queue, struct bio *bio)
{
- int ret = 0;
struct zram *zram = queue->queuedata;
if (!valid_io_request(zram, bio)) {
switch (bio_data_dir(bio)) {
case READ:
- ret = zram_read(zram, bio);
+ zram_read(zram, bio);
break;
case WRITE:
- ret = zram_write(zram, bio);
+ zram_write(zram, bio);
break;
}
- return ret;
+ return 0;
}
void zram_reset_device(struct zram *zram)