Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 167725
b: refs/heads/master
c: 478988d
h: refs/heads/master
i:
  167723: 30bb1bf
v: v3
  • Loading branch information
KOSAKI Motohiro authored and Linus Torvalds committed Oct 29, 2009
1 parent ab865e2 commit 3923915
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 58355c7876a0754377c37c8af948b4cd423410e2
refs/heads/master: 478988d3b28e98a31e0cfe24e011e28ba0f3cf0d
8 changes: 3 additions & 5 deletions trunk/kernel/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1710,14 +1710,13 @@ static ssize_t cgroup_write_X64(struct cgroup *cgrp, struct cftype *cft,
return -EFAULT;

buffer[nbytes] = 0; /* nul-terminate */
strstrip(buffer);
if (cft->write_u64) {
u64 val = simple_strtoull(buffer, &end, 0);
u64 val = simple_strtoull(strstrip(buffer), &end, 0);
if (*end)
return -EINVAL;
retval = cft->write_u64(cgrp, cft, val);
} else {
s64 val = simple_strtoll(buffer, &end, 0);
s64 val = simple_strtoll(strstrip(buffer), &end, 0);
if (*end)
return -EINVAL;
retval = cft->write_s64(cgrp, cft, val);
Expand Down Expand Up @@ -1753,8 +1752,7 @@ static ssize_t cgroup_write_string(struct cgroup *cgrp, struct cftype *cft,
}

buffer[nbytes] = 0; /* nul-terminate */
strstrip(buffer);
retval = cft->write_string(cgrp, cft, buffer);
retval = cft->write_string(cgrp, cft, strstrip(buffer));
if (!retval)
retval = nbytes;
out:
Expand Down

0 comments on commit 3923915

Please sign in to comment.