43 lines
1.2 KiB
Diff
43 lines
1.2 KiB
Diff
From 5fa11f3a32dac8398c3b917451b657d7b35bc36d Mon Sep 17 00:00:00 2001
|
|
From: HATAYAMA Daisuke <d.hatayama@fujitsu.com>
|
|
Date: Fri, 25 Dec 2020 15:48:45 +0900
|
|
Subject: [PATCH 04/11] diskdump, zram: initialize zram symbol information when
|
|
needed
|
|
|
|
In the current code, symbol information related to zram is initialized
|
|
even when a given disk is not zram. It should be done after the disk
|
|
turns out to be zram.
|
|
|
|
Signed-off-by: HATAYAMA Daisuke <d.hatayama@fujitsu.com>
|
|
---
|
|
diskdump.c | 6 +++---
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/diskdump.c b/diskdump.c
|
|
index 9485f307b350..8dda58643f6a 100644
|
|
--- a/diskdump.c
|
|
+++ b/diskdump.c
|
|
@@ -2725,9 +2725,6 @@ try_zram_decompress(ulonglong pte_val, unsigned char *buf, ulong len, ulonglong
|
|
unsigned char *zram_buf = NULL;
|
|
unsigned char *outbuf = NULL;
|
|
|
|
- if (INVALID_MEMBER(zram_compressor))
|
|
- zram_init();
|
|
-
|
|
off = PAGEOFFSET(vaddr);
|
|
if (!symbol_exists("swap_info"))
|
|
return 0;
|
|
@@ -2756,6 +2753,9 @@ try_zram_decompress(ulonglong pte_val, unsigned char *buf, ulong len, ulonglong
|
|
return 0;
|
|
}
|
|
|
|
+ if (INVALID_MEMBER(zram_compressor))
|
|
+ zram_init();
|
|
+
|
|
if (CRASHDEBUG(2))
|
|
error(WARNING, "this page has swapped to zram\n");
|
|
|
|
--
|
|
2.29.2
|
|
|