public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH][zram] Do not check for init flag before starting I/O
@ 2010-12-30  9:07 Nitin Gupta
  2010-12-30 17:17 ` Linus Torvalds
  0 siblings, 1 reply; 4+ messages in thread
From: Nitin Gupta @ 2010-12-30  9:07 UTC (permalink / raw)
  To: Greg KH
  Cc: Pekka Enberg, Linus Torvalds, Dennis Jansen, Linux Driver Project,
	linux-kernel

zram module is unusable without this fix.

Checking for init_done flag in zram_make_request() results in a
*no-op* for any I/O operation since we simply always return
success. This flag is actually set when the first write occurs
on a zram disk which triggers its initialization.

Bug report: https://bugzilla.kernel.org/show_bug.cgi?id=25722

Reported-by: Dennis Jansen <dennis.jansen@web.de>
Signed-off-by: Nitin Gupta <ngupta@vflare.org>
---
 drivers/staging/zram/zram_drv.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c
index 8c3c057..d0e9e02 100644
--- a/drivers/staging/zram/zram_drv.c
+++ b/drivers/staging/zram/zram_drv.c
@@ -435,12 +435,6 @@ static int zram_make_request(struct request_queue *queue, struct bio *bio)
 	int ret = 0;
 	struct zram *zram = queue->queuedata;
 
-	if (unlikely(!zram->init_done)) {
-		set_bit(BIO_UPTODATE, &bio->bi_flags);
-		bio_endio(bio, 0);
-		return 0;
-	}
-
 	if (!valid_io_request(zram, bio)) {
 		zram_stat64_inc(zram, &zram->stats.invalid_io);
 		bio_io_error(bio);
-- 
1.7.3.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-12-30 20:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-30  9:07 [PATCH][zram] Do not check for init flag before starting I/O Nitin Gupta
2010-12-30 17:17 ` Linus Torvalds
2010-12-30 19:02   ` Nitin Gupta
2010-12-30 20:09     ` Linus Torvalds

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox