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

Commit 316eb661 authored by Tao Ma's avatar Tao Ma Committed by Tejun Heo
Browse files

cgroup: set 'start' with the right value in cgroup_path.



'start' is set to buf + buflen and do the '--' immediately.
Just set it to 'buf + buflen - 1' directly.

Signed-off-by: default avatarTao Ma <boyu.mt@taobao.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Cc: Li Zefan <lizefan@huawei.com>
parent 4b1c7840
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1770,9 +1770,9 @@ int cgroup_path(const struct cgroup *cgrp, char *buf, int buflen)
		return 0;
	}

	start = buf + buflen;
	start = buf + buflen - 1;

	*--start = '\0';
	*start = '\0';
	for (;;) {
		int len = dentry->d_name.len;