zram: Protect handle_decomp_fail behind a check

the previous definitions as well as the creation of this is locked behind CONFIG_ZRAM_LRU_WRITEBACK as well

Change-Id: I869b5595f69cc481e93ca6862b460594762d9b25
urubino
Ruchit 3 months ago committed by Jenna-they-them
parent 86ebd3e78c
commit d261a5c03e
  1. 11
      drivers/block/zram/zram_drv.c

@ -2675,12 +2675,13 @@ static int __zram_bvec_read(struct zram *zram, struct page *page, u32 index,
kunmap_atomic(dst);
zcomp_stream_put(zram->comp);
}
#ifdef CONFIG_ZRAM_LRU_WRITEBACK
/* Should NEVER happen. BUG() if it does. */
if (unlikely(ret)) {
pr_err("Decompression failed! err=%d, page=%u, len=%u, addr=%p\n", ret, index, size, src);
print_hex_dump(KERN_ERR, "", DUMP_PREFIX_OFFSET, 16, 1, src, size, 1);
BUG();
}
if (unlikely(ret))
handle_decomp_fail(zram->compressor, ret, index, src, size,
NULL);
#endif
zs_unmap_object(zram->mem_pool, zram_entry_handle(zram, entry));
#ifdef CONFIG_ZRAM_LRU_WRITEBACK

Loading…
Cancel
Save