]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/unit: drop unneeded unit_modify_nft_set() call during coldplug
authorMike Yuan <me@yhndnzj.com>
Fri, 9 Jan 2026 18:06:07 +0000 (19:06 +0100)
committerMike Yuan <me@yhndnzj.com>
Sun, 18 Jan 2026 15:34:12 +0000 (16:34 +0100)
We re-realize all unit cgroups upon daemon-reload, and
cgroup_context_apply() would take care of NFT set refreshing.
No need to duplicate that in unit_coldplug().

src/core/cgroup.c
src/core/cgroup.h
src/core/unit.c

index 89257724379451216258f20739f0de45662e1f79..9a218ff05862c2690403fb14e32e437aa2f3bfc1 100644 (file)
@@ -1325,7 +1325,7 @@ static void cgroup_apply_firewall(Unit *u) {
         (void) bpf_firewall_install(u);
 }
 
-void unit_modify_nft_set(Unit *u, bool add) {
+static void unit_modify_nft_set(Unit *u, bool add) {
         int r;
 
         assert(u);
index 6c45b72f1172283f099719ef8c1c9a8b382eb6fa..5d450bd6085aee0f824b6594bddc0e7675e076d7 100644 (file)
@@ -379,8 +379,6 @@ int cgroup_context_add_device_allow(CGroupContext *c, const char *dev, CGroupDev
 int cgroup_context_add_or_update_device_allow(CGroupContext *c, const char *dev, CGroupDevicePermissions p);
 int cgroup_context_add_bpf_foreign_program(CGroupContext *c, uint32_t attach_type, const char *path);
 
-void unit_modify_nft_set(Unit *u, bool add);
-
 CGroupMask unit_get_own_mask(Unit *u);
 CGroupMask unit_get_delegate_mask(Unit *u);
 CGroupMask unit_get_members_mask(Unit *u);
index 84b3132dd840379e949d1725cbf296820302d3a7..95e52858059b803927fba97ce4e0a3c00885ba84 100644 (file)
@@ -3801,7 +3801,6 @@ int unit_coldplug(Unit *u) {
         if (u->nop_job)
                 RET_GATHER(r, job_coldplug(u->nop_job));
 
-        unit_modify_nft_set(u, /* add= */ true);
         return r;
 }