From d4d55c1fbbef31f0ddf10907994695fe16f42a17 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Mon, 16 Dec 2024 22:06:06 -0500 Subject: [PATCH] kernel/vm: Rename _FreePageRange "discarded" argument to "freedPages". Clarifies things. No functional change. --- headers/private/kernel/vm/VMCache.h | 2 +- src/system/kernel/vm/VMCache.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/headers/private/kernel/vm/VMCache.h b/headers/private/kernel/vm/VMCache.h index 9101ff75b9..c58e3a61e7 100644 --- a/headers/private/kernel/vm/VMCache.h +++ b/headers/private/kernel/vm/VMCache.h @@ -220,7 +220,7 @@ private: void _RemoveConsumer(VMCache* consumer); bool _FreePageRange(VMCachePagesTree::Iterator it, - page_num_t* toPage, page_num_t* discarded); + page_num_t* toPage, page_num_t* freedPages); private: int32 fRefCount; diff --git a/src/system/kernel/vm/VMCache.cpp b/src/system/kernel/vm/VMCache.cpp index da02f6f080..18642aa518 100644 --- a/src/system/kernel/vm/VMCache.cpp +++ b/src/system/kernel/vm/VMCache.cpp @@ -1106,7 +1106,7 @@ VMCache::SetMinimalCommitment(off_t commitment, int priority) bool VMCache::_FreePageRange(VMCachePagesTree::Iterator it, - page_num_t* toPage = NULL, page_num_t* discarded = NULL) + page_num_t* toPage = NULL, page_num_t* freedPages = NULL) { for (vm_page* page = it.Next(); page != NULL && (toPage == NULL || page->cache_offset < *toPage); @@ -1118,8 +1118,8 @@ VMCache::_FreePageRange(VMCachePagesTree::Iterator it, // as we might cause a deadlock this way page->busy_writing = false; // this will notify the writer to free the page - if (discarded != NULL) - (*discarded)++; + if (freedPages != NULL) + (*freedPages)++; continue; } @@ -1140,8 +1140,8 @@ VMCache::_FreePageRange(VMCachePagesTree::Iterator it, // removing the current node is safe. vm_page_free(this, page); - if (discarded != NULL) - (*discarded)++; + if (freedPages != NULL) + (*freedPages)++; } return false;