diff --git a/[refs] b/[refs] index ec71e8f69e41..f7e82dbd7736 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8f1466ff0a6e81653e9bb0d9247495bf4e9db7e2 +refs/heads/master: 3cdeed2986b09fcc77b4812ca10dbc057e4e5f8c diff --git a/trunk/kernel/cgroup.c b/trunk/kernel/cgroup.c index 1a3c23936d43..ae367471b07b 100644 --- a/trunk/kernel/cgroup.c +++ b/trunk/kernel/cgroup.c @@ -1355,16 +1355,14 @@ static ssize_t cgroup_common_file_write(struct cgroup *cgrp, if (nbytes && (buffer[nbytes-1] == '\n')) { buffer[nbytes-1] = 0; } - if (nbytes < sizeof(root->release_agent_path)) { - /* We never write anything other than '\0' - * into the last char of release_agent_path, - * so it always remains a NUL-terminated - * string */ - strncpy(root->release_agent_path, buffer, nbytes); - root->release_agent_path[nbytes] = 0; - } else { - retval = -ENOSPC; - } + + /* We never write anything other than '\0' + * into the last char of release_agent_path, + * so it always remains a NUL-terminated + * string */ + strncpy(root->release_agent_path, buffer, nbytes); + root->release_agent_path[nbytes] = 0; + break; } default: