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 01:59:43 +0000 (18:59 -0700)
commit4693080316e671580459875723795fdb805a6cf4
tree0f5fbd3ec54c85cb3acf3b3eaa40aab6ab4aa399
parent5463a3dccf10204577b8c1c170ca66efa7b65e3e
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