From 9c6e5c59e0f9a707b31587e80dc67a731a8aaf1d Mon Sep 17 00:00:00 2001 From: Nitin Gupta Date: Sat, 5 Feb 2011 20:34:20 -0500 Subject: [PATCH] --- yaml --- r: 233104 b: refs/heads/master c: 5414e557fca545614ceedc3d3496f747457e2e3b h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/staging/zram/zram_drv.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index ae9cb47cbf4e..5700826ae0ba 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0742cecbd431fd057b45fd8c0d60f0907e00e17f +refs/heads/master: 5414e557fca545614ceedc3d3496f747457e2e3b diff --git a/trunk/drivers/staging/zram/zram_drv.c b/trunk/drivers/staging/zram/zram_drv.c index 5415712f01f8..4bd8cbdaee76 100644 --- a/trunk/drivers/staging/zram/zram_drv.c +++ b/trunk/drivers/staging/zram/zram_drv.c @@ -227,6 +227,7 @@ static int zram_read(struct zram *zram, struct bio *bio) if (zram_test_flag(zram, index, ZRAM_ZERO)) { handle_zero_page(page); + index++; continue; } @@ -235,12 +236,14 @@ static int zram_read(struct zram *zram, struct bio *bio) pr_debug("Read before write: sector=%lu, size=%u", (ulong)(bio->bi_sector), bio->bi_size); /* Do nothing */ + index++; continue; } /* Page is stored uncompressed since it's incompressible */ if (unlikely(zram_test_flag(zram, index, ZRAM_UNCOMPRESSED))) { handle_uncompressed_page(zram, page, index); + index++; continue; } @@ -320,6 +323,7 @@ static int zram_write(struct zram *zram, struct bio *bio) mutex_unlock(&zram->lock); zram_stat_inc(&zram->stats.pages_zero); zram_set_flag(zram, index, ZRAM_ZERO); + index++; continue; }