Commit 9dce07d8 authored by Carlos Llamas's avatar Carlos Llamas Committed by Rick Yiu
Browse files

FROMGIT: binder: split up binder_update_page_range()



The binder_update_page_range() function performs both allocation and
freeing of binder pages. However, these two operations are unrelated and
have no common logic. In fact, when a free operation is requested, the
allocation logic is skipped entirely. This behavior makes the error path
unnecessarily complex. To improve readability of the code, this patch
splits the allocation and freeing operations into separate functions.

No functional changes are introduced by this patch.

Reviewed-by: default avatarAlice Ryhl <aliceryhl@google.com>
Signed-off-by: default avatarCarlos Llamas <cmllamas@google.com>
Link: https://lore.kernel.org/r/20231201172212.1813387-11-cmllamas@google.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 254650075
Bug: 320576997
(cherry picked from commit 0d35bf3b
 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git


 char-misc-next)
Change-Id: Iaf64f94564d2017c4633f2421c15b0bdee914738
Signed-off-by: default avatarCarlos Llamas <cmllamas@google.com>
parent 3a28e9d7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment