Skip to content

Commit

Permalink
Staging: zram: make zram_read return a bio error if the device is not…
Browse files Browse the repository at this point in the history
… initialized

Make zram_read() return a bio error if the device is not initialized
instead of pretending nothing happened.

Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
Acked-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Jerome Marchand authored and Greg Kroah-Hartman committed Jan 21, 2011
1 parent f2da987 commit 1aa3266
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/staging/zram/zram_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 1aa3266

Please sign in to comment.