Skip to content

Commit 15b8b9a

Browse files
Werkovhtejun
authored andcommitted
cgroup/pids: Remove superfluous zeroing
Atomic counters are in kzalloc'd struct. They are zeroed already and atomic64_t does not need special initialization (cf kernel/trace/trace_clock.c:trace_counter). Signed-off-by: Michal Koutný <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
1 parent a24e3b7 commit 15b8b9a

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

kernel/cgroup/pids.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,7 @@ pids_css_alloc(struct cgroup_subsys_state *parent)
7575
if (!pids)
7676
return ERR_PTR(-ENOMEM);
7777

78-
atomic64_set(&pids->counter, 0);
7978
atomic64_set(&pids->limit, PIDS_MAX);
80-
atomic64_set(&pids->events_limit, 0);
8179
return &pids->css;
8280
}
8381

0 commit comments

Comments
 (0)