struct zram *zram;
unsigned long entry;
struct page *page;
+ int error;
};
static void zram_sync_read(struct work_struct *work)
bio_init(&bio, zw->zram->bdev, &bv, 1, REQ_OP_READ);
bio.bi_iter.bi_sector = zw->entry * (PAGE_SIZE >> 9);
__bio_add_page(&bio, zw->page, PAGE_SIZE, 0);
- submit_bio_wait(&bio);
+ zw->error = submit_bio_wait(&bio);
}
/*
flush_work(&work.work);
destroy_work_on_stack(&work.work);
- return 1;
+ return work.error;
}
static int read_from_bdev(struct zram *zram, struct page *page,
return read_from_bdev_sync(zram, page, entry);
}
read_from_bdev_async(zram, page, entry, parent);
- return 1;
+ return 0;
}
#else
static inline void reset_bdev(struct zram *zram) {};