diff options
author | Joel Fernandes <joelaf@google.com> | 2016-10-20 00:34:01 -0700 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2016-11-15 16:34:25 -0800 |
commit | 663deb47880f2283809669563c5a52ac7c6aef1a (patch) | |
tree | fdfbc8b4d4abcfdf55bc348ac266528912938ed1 /fs/pstore/ram.c | |
parent | d8991f51e55fd3c5b8ad055653a5998e53d4ec91 (diff) | |
download | linux-663deb47880f2283809669563c5a52ac7c6aef1a.tar.bz2 |
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.c | 5 |
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); |