From 4c51faeb59cf8a44554067f1419446e8c9013b67 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Fri, 11 Mar 2022 14:18:04 -0500 Subject: [PATCH] kernel/vm: Use get_area_page_protection in all cases of _user_get_memory_properties. It already checks for area->page_protections == NULL and returns area->protection appropriately if so, we do not need to test specifically for that here. No functional change intended. --- src/system/kernel/vm/vm.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/system/kernel/vm/vm.cpp b/src/system/kernel/vm/vm.cpp index 3d7597b402..622f7bbf48 100644 --- a/src/system/kernel/vm/vm.cpp +++ b/src/system/kernel/vm/vm.cpp @@ -6905,11 +6905,7 @@ _user_get_memory_properties(team_id teamID, const void* address, if (area == NULL) return B_NO_MEMORY; - - uint32 protection = area->protection; - if (area->page_protections != NULL) - protection = get_area_page_protection(area, (addr_t)address); - + uint32 protection = get_area_page_protection(area, (addr_t)address); uint32 wiring = area->wiring; locker.Unlock();