Search
SailfishOS Open Build Service
>
Projects
>
home:dcthang:branches:nemo:devel:hw:ti:omap3:n900
>
kernel-adaptation-n900
> linux-2.6.39-Staging-zram-make-zram_read-return-a-bio-error-if-th.patch
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File linux-2.6.39-Staging-zram-make-zram_read-return-a-bio-error-if-th.patch of Package kernel-adaptation-n900
From 24189776e2e2026855c061e3487998dbb864e145 Mon Sep 17 00:00:00 2001 From: Jerome Marchand <jmarchan@redhat.com> Date: Fri, 17 Dec 2010 17:03:15 +0100 Subject: [PATCH] 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> --- 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 080e85f..2a18c81 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; } -- 1.7.0.4