diff --git a/WHATS_NEW b/WHATS_NEW index a545a5d8b..da5f5f473 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.178 - ===================================== + Add prioritized_section() to restore cookie boundaries (2.02.177). Enhance error messages when read error happens. Enhance mirror log initialization for old mirror target. Skip private crypto and stratis devices. diff --git a/lib/mm/memlock.c b/lib/mm/memlock.c index 897bf10ee..b55cc97f9 100644 --- a/lib/mm/memlock.c +++ b/lib/mm/memlock.c @@ -634,6 +634,11 @@ int critical_section(void) return _critical_section; } +int prioritized_section(void) +{ + return _priority_raised; +} + /* * The memlock_*_daemon functions will force the mlockall() call that we need * to stay in memory, but they will have no effect on device scans (unlike diff --git a/lib/mm/memlock.h b/lib/mm/memlock.h index ef2ebcb87..d0807d52b 100644 --- a/lib/mm/memlock.h +++ b/lib/mm/memlock.h @@ -34,6 +34,7 @@ struct cmd_context; void critical_section_inc(struct cmd_context *cmd, const char *reason); void critical_section_dec(struct cmd_context *cmd, const char *reason); int critical_section(void); +int prioritized_section(void); void memlock_inc_daemon(struct cmd_context *cmd); void memlock_dec_daemon(struct cmd_context *cmd); int memlock_count_daemon(void);