提交 316eb661 编写于 作者: T Tao Ma 提交者: Tejun Heo

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: NTao Ma <boyu.mt@taobao.com>
Signed-off-by: NTejun Heo <tj@kernel.org>
Cc: Li Zefan <lizefan@huawei.com>
上级 4b1c7840
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册