X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/3e170ce000f1506b7b5d2c5c7faec85ceabb573d..cc8bc92ae4a8e9f1a1ab61bf83d34ad8150b3405:/osfmk/kern/hibernate.c diff --git a/osfmk/kern/hibernate.c b/osfmk/kern/hibernate.c index c15eb172e..0bbc73d49 100644 --- a/osfmk/kern/hibernate.c +++ b/osfmk/kern/hibernate.c @@ -34,7 +34,6 @@ #include #include #include -#include #include #include @@ -106,14 +105,13 @@ hibernate_setup(IOHibernateImageHeader * header, hibernate_reset_stats(); - if (vmflush && (COMPRESSED_PAGER_IS_ACTIVE || dp_isssd)) { + if (vmflush && VM_CONFIG_COMPRESSOR_IS_PRESENT) { sync_internal(); - if (COMPRESSED_PAGER_IS_ACTIVE) { - vm_decompressor_lock(); - need_to_unlock_decompressor = TRUE; - } + vm_decompressor_lock(); + need_to_unlock_decompressor = TRUE; + hibernate_flush_memory(); } @@ -147,7 +145,7 @@ hibernate_teardown(hibernate_page_list_t * page_list, if (page_list_pal) kfree(page_list_pal, page_list_pal->list_size); - if (COMPRESSED_PAGER_IS_ACTIVE) { + if (VM_CONFIG_COMPRESSOR_IS_PRESENT) { if (need_to_unlock_decompressor == TRUE) { need_to_unlock_decompressor = FALSE; vm_decompressor_unlock();