mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 09:59:32 +00:00
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>
This commit is contained in:
parent
f2da98739d
commit
1aa326640d
1 changed files with 1 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue