cgroup: set 'start' with the right value in cgroup_path.
PATCH 1/1 cgroup: set 'start' with the right value in cgroup_path.
From: Tao Ma <[email protected]>
'start' is set to buf + buflen and do the '--' immediately. Just set it to 'buf + buflen - 1' directly.
--- kernel/cgroup.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
kernel/cgroup.c +2 -2
@@ -1821,9 +1821,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;
Signature · 1 line
1.7.1
Hello,
Quoted 7 lines · Tao Ma
From: Tao Ma <[email protected]>
'start' is set to buf + buflen and do the '--' immediately. Just set it to 'buf + buflen - 1' directly.
Cc Tejun Heo <[email protected]>Cc Li Zefan <[email protected]>
You're missing S-O-B. I added it while applying. Please ack if you agree.
Heh, I'm not sure how much of an improvement this is but there's obviously nothing wrong with it either. Applying to cgroup/for-3.8.
Thanks.
Signature · 1 line
tejun
Quoted 5 lines · Tejun Heo
Hello,
Quoted 2 lines · Tao Ma
From: Tao Ma <[email protected]>
Quoted 8 lines
Quoted 5 lines
'start' is set to buf + buflen and do the '--' immediately. Just set it to 'buf + buflen - 1' directly.
Cc Tejun Heo <[email protected]>Cc Li Zefan <[email protected]>You're missing S-O-B. I added it while applying. Please ack if you agree.
oops, sorry, please add
Thanks
Tao
Quoted 6 lines
Heh, I'm not sure how much of an improvement this is but there's obviously nothing wrong with it either. Applying to cgroup/for-3.8.
Thanks.