core/unit: drop unneeded unit_modify_nft_set() call during coldplug
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().
This commit is contained in:
+1
-1
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user