diff options
-rw-r--r-- | fs/pstore/ram.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c index 9fe5b13..1daed280 100644 --- a/fs/pstore/ram.c +++ b/fs/pstore/ram.c @@ -120,12 +120,12 @@ ramoops_get_next_prz(struct persistent_ram_zone *przs[], uint *c, uint max, prz = przs[i]; - if (update) { - /* Update old/shadowed buffer. */ + /* Update old/shadowed buffer. */ + if (update) persistent_ram_save_old(prz); - if (!persistent_ram_old_size(prz)) - return NULL; - } + + if (!persistent_ram_old_size(prz)) + return NULL; *typep = type; *id = i; |