diff options
author | Jerome Marchand <jmarchan@redhat.com> | 2010-12-17 16:03:15 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-01-21 00:07:00 (GMT) |
commit | 1aa326640d1e91d32179310441fa3030c501d0f3 (patch) | |
tree | 14eaed82cdadf87d92333c5dd4d60f8c4cd50198 | |
parent | f2da98739da4e20e907f8317d513868764002d31 (diff) | |
download | linux-fsl-qoriq-1aa326640d1e91d32179310441fa3030c501d0f3.tar.xz |
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: Jerome Marchand <jmarchan@redhat.com>
Acked-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/zram/zram_drv.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c index 0ab931e..01d6dd9 100644 --- a/drivers/staging/zram/zram_drv.c +++ b/drivers/staging/zram/zram_drv.c @@ -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; } |