diff options
author | Tao Ma <boyu.mt@taobao.com> | 2012-11-08 13:36:38 (GMT) |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2012-11-08 14:23:02 (GMT) |
commit | 316eb661f125397d46f16f94e3c81ad3dc4c1233 (patch) | |
tree | 6b3298bff5f264a7046e7bdac2a0ffcd04fbadc8 /kernel/cgroup.c | |
parent | 4b1c7840b7d01b14a1a00fa0e61b761d4391ba67 (diff) | |
download | linux-fsl-qoriq-316eb661f125397d46f16f94e3c81ad3dc4c1233.tar.xz |
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: Tao Ma <boyu.mt@taobao.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Li Zefan <lizefan@huawei.com>
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r-- | kernel/cgroup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 3070164..998ab59 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -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; |