* [PATCH] zram: fix zram_bvec_read duplicate dump failure message and stat accumulation
@ 2013-03-13 7:06 Wanpeng Li
0 siblings, 0 replies; only message in thread
From: Wanpeng Li @ 2013-03-13 7:06 UTC (permalink / raw)
To: Andrew Morton
Cc: Greg Kroah-Hartman, Dan Magenheimer, Seth Jennings,
Konrad Rzeszutek Wilk, Minchan Kim, linux-mm, linux-kernel,
Wanpeng Li
When zram decompress fails, the code unnecessarily dumps failure messages and
does stat accumulation in function zram_decompress_page(), this work is already
done in function zram_decompress_page, the patch skips the redundant work.
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
---
drivers/staging/zram/zram_drv.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c
index 5918fd7..e34e3fe 100644
--- a/drivers/staging/zram/zram_drv.c
+++ b/drivers/staging/zram/zram_drv.c
@@ -207,11 +207,8 @@ static int zram_bvec_read(struct zram *zram, struct bio_vec *bvec,
ret = zram_decompress_page(zram, uncmem, index);
/* Should NEVER happen. Return bio error if it does. */
- if (unlikely(ret != LZO_E_OK)) {
- pr_err("Decompression failed! err=%d, page=%u\n", ret, index);
- zram_stat64_inc(zram, &zram->stats.failed_reads);
+ if (unlikely(ret != LZO_E_OK))
goto out_cleanup;
- }
if (is_partial_io(bvec))
memcpy(user_mem + bvec->bv_offset, uncmem + offset,
--
1.7.11.7
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-03-13 7:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-13 7:06 [PATCH] zram: fix zram_bvec_read duplicate dump failure message and stat accumulation Wanpeng Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).