提交 1aa32664 编写于 作者: J Jerome Marchand 提交者: Greg Kroah-Hartman

Staging: zram: make zram_read return a bio error if the device is not initialized

Make zram_read() return a bio error if the device is not initialized
instead of pretending nothing happened.
Signed-off-by: NJerome Marchand <jmarchan@redhat.com>
Acked-by: NJeff Moyer <jmoyer@redhat.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 f2da9873
......@@ -208,8 +208,7 @@ static int zram_read(struct zram *zram, struct bio *bio)
struct bio_vec *bvec;
if (unlikely(!zram->init_done)) {
set_bit(BIO_UPTODATE, &bio->bi_flags);
bio_endio(bio, 0);
bio_endio(bio, -ENXIO);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册