diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2017-12-08 13:11:35 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2017-12-08 13:21:15 +0100 |
commit | 455b26b8dbdd05ec773a84da2ef64b669c80e194 (patch) | |
tree | f4ecfc78c776ee9170ef91b36064eb5abc019bbd /lib/mm | |
parent | 4e8af1d3aa136eae8dbb66186bfc331b0b2887e6 (diff) | |
download | lvm2-455b26b8dbdd05ec773a84da2ef64b669c80e194.tar.gz |
activation: keep priority till memlock_unlock
Although it doesn't look like it can be a measurable problem
and costs some time to flip priorities outside of activation window.
So just like with memory locking preserve priority until call
memlock_unlock() appears.
(addition to commit c086dfadc389551b9a2d7b4c26931e5e74ada8d6).
Diffstat (limited to 'lib/mm')
-rw-r--r-- | lib/mm/memlock.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/mm/memlock.c b/lib/mm/memlock.c index f72b86cc8..897bf10ee 100644 --- a/lib/mm/memlock.c +++ b/lib/mm/memlock.c @@ -627,8 +627,6 @@ void critical_section_dec(struct cmd_context *cmd, const char *reason) log_debug_activation("Leaving critical section (%s).", reason); } else log_debug_activation("Leaving section (%s).", reason); - - _restore_priority_if_possible(cmd); } int critical_section(void) @@ -683,6 +681,7 @@ void memlock_reset(void) void memlock_unlock(struct cmd_context *cmd) { _unlock_mem_if_possible(cmd); + _restore_priority_if_possible(cmd); } int memlock_count_daemon(void) |