diff options
Diffstat (limited to 'drivers/staging/zram')
-rw-r--r-- | drivers/staging/zram/zram_drv.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c index 1017d6df17d..5fdf9d2fc95 100644 --- a/drivers/staging/zram/zram_drv.c +++ b/drivers/staging/zram/zram_drv.c | |||
@@ -230,6 +230,7 @@ static void zram_read(struct zram *zram, struct bio *bio) | |||
230 | 230 | ||
231 | if (zram_test_flag(zram, index, ZRAM_ZERO)) { | 231 | if (zram_test_flag(zram, index, ZRAM_ZERO)) { |
232 | handle_zero_page(page); | 232 | handle_zero_page(page); |
233 | index++; | ||
233 | continue; | 234 | continue; |
234 | } | 235 | } |
235 | 236 | ||
@@ -238,12 +239,14 @@ static void zram_read(struct zram *zram, struct bio *bio) | |||
238 | pr_debug("Read before write: sector=%lu, size=%u", | 239 | pr_debug("Read before write: sector=%lu, size=%u", |
239 | (ulong)(bio->bi_sector), bio->bi_size); | 240 | (ulong)(bio->bi_sector), bio->bi_size); |
240 | handle_zero_page(page); | 241 | handle_zero_page(page); |
242 | index++; | ||
241 | continue; | 243 | continue; |
242 | } | 244 | } |
243 | 245 | ||
244 | /* Page is stored uncompressed since it's incompressible */ | 246 | /* Page is stored uncompressed since it's incompressible */ |
245 | if (unlikely(zram_test_flag(zram, index, ZRAM_UNCOMPRESSED))) { | 247 | if (unlikely(zram_test_flag(zram, index, ZRAM_UNCOMPRESSED))) { |
246 | handle_uncompressed_page(zram, page, index); | 248 | handle_uncompressed_page(zram, page, index); |
249 | index++; | ||
247 | continue; | 250 | continue; |
248 | } | 251 | } |
249 | 252 | ||
@@ -322,6 +325,7 @@ static void zram_write(struct zram *zram, struct bio *bio) | |||
322 | mutex_unlock(&zram->lock); | 325 | mutex_unlock(&zram->lock); |
323 | zram_stat_inc(&zram->stats.pages_zero); | 326 | zram_stat_inc(&zram->stats.pages_zero); |
324 | zram_set_flag(zram, index, ZRAM_ZERO); | 327 | zram_set_flag(zram, index, ZRAM_ZERO); |
328 | index++; | ||
325 | continue; | 329 | continue; |
326 | } | 330 | } |
327 | 331 | ||