This commit is contained in:
Elmer Miroslav Mosher Golovin 2026-03-11 01:10:23 +03:00 committed by GitHub
commit 2141296e03
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 1 deletions

View File

@ -26,6 +26,7 @@
#include <linux/version.h>
#include "binder_alloc.h"
#include "binder_trace.h"
#include "compat_version.h"
struct list_lru binder_alloc_lru;
@ -1073,7 +1074,8 @@ static unsigned long
binder_shrink_scan(struct shrinker *shrink, struct shrink_control *sc)
{
unsigned long ret;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 13, 0))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 13, 0) || \
defined(RHEL_10_1_BACKPORTS))
ret = list_lru_walk(&binder_alloc_lru, binder_alloc_free_page_no_lock,
NULL, sc->nr_to_scan);
#else

10
binder/compat_version.h Normal file
View File

@ -0,0 +1,10 @@
#ifndef __COMPAT_VERSION_H__
# define __COMPAT_VERSION_H__
#if defined(RHEL_RELEASE_CODE) && defined(RHEL_RELEASE_VERSION)
# if RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(10, 1)
# define RHEL_10_1_BACKPORTS 1
# endif
#endif
#endif /* __COMPAT_VERSION_H__ */