summaryrefslogtreecommitdiffstats
path: root/fs/pstore/ram.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2012-07-20 09:42:59 +0200
committerPaul Mundt <lethal@linux-sh.org>2012-07-20 09:42:59 +0200
commit9ff561fdf73493d757bbc74aa58627e1381650fb (patch)
tree4484d230662126b1ac94ea545ca5429c91e0a68b /fs/pstore/ram.c
parentMerge branch 'common/pfc' into sh-latest (diff)
parentsh: pfc: pin config get/set support. (diff)
downloadlinux-9ff561fdf73493d757bbc74aa58627e1381650fb.tar.xz
linux-9ff561fdf73493d757bbc74aa58627e1381650fb.zip
Merge branch 'common/pinctrl' into sh-latest
Diffstat (limited to 'fs/pstore/ram.c')
-rw-r--r--fs/pstore/ram.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
index 9123cce28c1e..453030f9c5bc 100644
--- a/fs/pstore/ram.c
+++ b/fs/pstore/ram.c
@@ -106,6 +106,8 @@ static ssize_t ramoops_pstore_read(u64 *id, enum pstore_type_id *type,
time->tv_sec = 0;
time->tv_nsec = 0;
+ /* Update old/shadowed buffer. */
+ persistent_ram_save_old(prz);
size = persistent_ram_old_size(prz);
*buf = kmalloc(size, GFP_KERNEL);
if (*buf == NULL)
@@ -184,6 +186,7 @@ static int ramoops_pstore_erase(enum pstore_type_id type, u64 id,
return -EINVAL;
persistent_ram_free_old(cxt->przs[id]);
+ persistent_ram_zap(cxt->przs[id]);
return 0;
}