OSDN Git Service

pstore: Allow prz to control need for locking
authorJoel Fernandes <joelaf@google.com>
Thu, 20 Oct 2016 07:34:01 +0000 (00:34 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Aug 2017 02:19:43 +0000 (19:19 -0700)
commitaca5b1e3c5b7e73f20b686ca712cb4cf9fccb219
tree448862ce36b205e0e54306edc0e14fca31f38e84
parentff013a624258e868d37ec75bad5c9afe5a63a91a
pstore: Allow prz to control need for locking

commit 663deb47880f2283809669563c5a52ac7c6aef1a upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/pstore/ram.c
fs/pstore/ram_core.c
include/linux/pstore_ram.h