summaryrefslogtreecommitdiff
path: root/fs/pstore/ram.c
diff options
context:
space:
mode:
authorJoel Fernandes <joelaf@google.com>2016-10-20 10:34:01 +0300
committerKees Cook <keescook@chromium.org>2016-11-16 03:34:25 +0300
commit663deb47880f2283809669563c5a52ac7c6aef1a (patch)
treefdfbc8b4d4abcfdf55bc348ac266528912938ed1 /fs/pstore/ram.c
parentd8991f51e55fd3c5b8ad055653a5998e53d4ec91 (diff)
downloadlinux-663deb47880f2283809669563c5a52ac7c6aef1a.tar.xz
pstore: Allow prz to control need for locking
In preparation of not locking at all for certain buffers depending on if there's contention, make locking optional depending on the initialization of the prz. Signed-off-by: Joel Fernandes <joelaf@google.com> [kees: moved locking flag into prz instead of via caller arguments] Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'fs/pstore/ram.c')
-rw-r--r--fs/pstore/ram.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
index 6d1393965b0a..86ac59066fba 100644
--- a/fs/pstore/ram.c
+++ b/fs/pstore/ram.c
@@ -432,7 +432,7 @@ static int ramoops_init_przs(struct device *dev, struct ramoops_context *cxt,
for (i = 0; i < cxt->max_dump_cnt; i++) {
cxt->przs[i] = persistent_ram_new(*paddr, cxt->record_size, 0,
&cxt->ecc_info,
- cxt->memtype);
+ cxt->memtype, 0);
if (IS_ERR(cxt->przs[i])) {
err = PTR_ERR(cxt->przs[i]);
dev_err(dev, "failed to request mem region (0x%zx@0x%llx): %d\n",
@@ -469,7 +469,8 @@ static int ramoops_init_prz(struct device *dev, struct ramoops_context *cxt,
return -ENOMEM;
}
- *prz = persistent_ram_new(*paddr, sz, sig, &cxt->ecc_info, cxt->memtype);
+ *prz = persistent_ram_new(*paddr, sz, sig, &cxt->ecc_info,
+ cxt->memtype, 0);
if (IS_ERR(*prz)) {
int err = PTR_ERR(*prz);