summaryrefslogtreecommitdiffstats
path: root/drivers/staging/zram
diff options
context:
space:
mode:
authorJerome Marchand <jmarchan@redhat.com>2010-12-17 17:03:15 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2011-01-20 16:07:00 -0800
commit1aa326640d1e91d32179310441fa3030c501d0f3 (patch)
tree14eaed82cdadf87d92333c5dd4d60f8c4cd50198 /drivers/staging/zram
parentf2da98739da4e20e907f8317d513868764002d31 (diff)
downloadblackbird-op-linux-1aa326640d1e91d32179310441fa3030c501d0f3.tar.gz
blackbird-op-linux-1aa326640d1e91d32179310441fa3030c501d0f3.zip
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>
Diffstat (limited to 'drivers/staging/zram')
-rw-r--r--drivers/staging/zram/zram_drv.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c
index 0ab931e9ee7e..01d6dd952581 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;
}
OpenPOWER on IntegriCloud