Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cb1c4b71 authored by Li Zefan's avatar Li Zefan Committed by David S. Miller
Browse files

cls_cgroup: remove unneeded cgroup_lock



We can remove this lock here, since we are in cgroup write handler and
thus the cgrp is guaranteed to be valid, and no lock is needed when
writing a u32 variable.

Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsuc.com>
Acked-by: default avatarPaul Menage <menage@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3a6d54c5
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -62,13 +62,7 @@ static u64 read_classid(struct cgroup *cgrp, struct cftype *cft)

static int write_classid(struct cgroup *cgrp, struct cftype *cft, u64 value)
{
	if (!cgroup_lock_live_group(cgrp))
		return -ENODEV;

	cgrp_cls_state(cgrp)->classid = (u32) value;

	cgroup_unlock();

	return 0;
}