kernel/vm: Use already determined priority in middle cut_area.

Change-Id: I4dd677a0f1378f4fa483502124bea70ad7ba40c0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2585
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
Michael Lotz 2020-05-02 21:33:40 +02:00 committed by waddlesplash
parent f626525071
commit d2dd287e5e

View File

@ -732,8 +732,7 @@ cut_area(VMAddressSpace* addressSpace, VMArea* area, addr_t address,
// Create a new cache for the second area.
VMCache* secondCache;
error = VMCacheFactory::CreateAnonymousCache(secondCache, false, 0, 0,
dynamic_cast<VMAnonymousNoSwapCache*>(cache) == NULL,
VM_PRIORITY_USER);
dynamic_cast<VMAnonymousNoSwapCache*>(cache) == NULL, priority);
if (error != B_OK) {
addressSpace->ShrinkAreaTail(area, oldSize, allocationFlags);
return error;