mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-31 05:47:43 +03:00
memlock: check for proper reserved size
Fix regression introduced with commit: 964012fdb924076e9ab97fabe00e759ddbf7c3bd that effectively disabled memory locking before suspending volumes. From merging/testing there remained wrong condition as we really want to check for 0 memory reservation value for both checked settings.
This commit is contained in:
parent
1576273273
commit
4ef211a187
@ -517,7 +517,7 @@ static void _restore_priority_if_possible(struct cmd_context *cmd)
|
||||
/* Stop memory getting swapped out */
|
||||
static void _lock_mem(struct cmd_context *cmd)
|
||||
{
|
||||
if (!_size_stack || _size_malloc_tmp) {
|
||||
if (!_size_stack || !_size_malloc_tmp) {
|
||||
log_debug_mem("Skipping memory locking (reserved memory: "
|
||||
FMTsize_t " stack: " FMTsize_t ").",
|
||||
_size_malloc_tmp, _size_stack);
|
||||
@ -564,7 +564,7 @@ static void _unlock_mem(struct cmd_context *cmd)
|
||||
{
|
||||
size_t unlock_mstats = 0;
|
||||
|
||||
if (!_size_stack || _size_malloc_tmp) {
|
||||
if (!_size_stack || !_size_malloc_tmp) {
|
||||
log_debug_mem("Skipping memory unlocking (reserved memory: "
|
||||
FMTsize_t " stack: " FMTsize_t ").",
|
||||
_size_malloc_tmp, _size_stack);
|
||||
|
Loading…
x
Reference in New Issue
Block a user