Message ID | bd48fa6ca65fadb9ab84a8fec6f0b0ed5e4f2fd4.1723464485.git.chen.haonan2@zte.com.cn (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [linux-next] pstore/ram: Fix pstore lost information | expand |
diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c index 4311fcbc84f2..4cb6e96df6b9 100644 --- a/fs/pstore/ram.c +++ b/fs/pstore/ram.c @@ -436,7 +436,8 @@ static int ramoops_pstore_erase(struct pstore_record *record) } persistent_ram_free_old(prz); - persistent_ram_zap(prz); + if (record->type == PSTORE_TYPE_DMESG) + persistent_ram_zap(prz); return 0; }