Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1aa32664 authored by Jerome Marchand's avatar Jerome Marchand Committed by Greg Kroah-Hartman
Browse files

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: default avatarJerome Marchand <jmarchan@redhat.com>
Acked-by: default avatarJeff Moyer <jmoyer@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent f2da9873
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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;
	}