Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:michael-chang:test:grub:old
grub2
0018-mm-Drop-unused-unloading-of-modules-on-OOM...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0018-mm-Drop-unused-unloading-of-modules-on-OOM.patch of Package grub2
From 713915e7d2c380e902cf14001d1fb50beea6bb39 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt <ps@pks.im> Date: Thu, 21 Apr 2022 15:24:17 +1000 Subject: [PATCH 18/26] mm: Drop unused unloading of modules on OOM In grub_memalign(), there's a commented section which would allow for unloading of unneeded modules in case where there is not enough free memory available to satisfy a request. Given that this code is never compiled in, let's remove it together with grub_dl_unload_unneeded(). Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Daniel Axtens <dja@axtens.net> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com> Tested-by: Patrick Steinhardt <ps@pks.im> (cherry picked from commit 139fd9b134a01e0b5fe0ebefafa7f48d1ffb6d60) --- grub-core/kern/dl.c | 20 -------------------- include/grub/dl.h | 1 - 2 files changed, 21 deletions(-) diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c index 220ea56c0..7f2a4c073 100644 --- a/grub-core/kern/dl.c +++ b/grub-core/kern/dl.c @@ -912,23 +912,3 @@ grub_dl_unload (grub_dl_t mod) grub_free (mod); return 1; } - -/* Unload unneeded modules. */ -void -grub_dl_unload_unneeded (void) -{ - /* Because grub_dl_remove modifies the list of modules, this - implementation is tricky. */ - grub_dl_t p = grub_dl_head; - - while (p) - { - if (grub_dl_unload (p)) - { - p = grub_dl_head; - continue; - } - - p = p->next; - } -} diff --git a/include/grub/dl.h b/include/grub/dl.h index db0cbb09c..c873ea988 100644 --- a/include/grub/dl.h +++ b/include/grub/dl.h @@ -204,7 +204,6 @@ grub_dl_t EXPORT_FUNC(grub_dl_load) (const char *name); grub_dl_t grub_dl_load_core (void *addr, grub_size_t size); grub_dl_t EXPORT_FUNC(grub_dl_load_core_noinit) (void *addr, grub_size_t size); int EXPORT_FUNC(grub_dl_unload) (grub_dl_t mod); -extern void grub_dl_unload_unneeded (void); extern int EXPORT_FUNC(grub_dl_ref) (grub_dl_t mod); extern int EXPORT_FUNC(grub_dl_unref) (grub_dl_t mod); extern int EXPORT_FUNC(grub_dl_ref_count) (grub_dl_t mod); -- 2.42.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor