Re: [RFC 2/4] cgroup: implement hierarchy limits
From: Tejun Heo <hidden>
Date: 2017-08-02 18:44:23
Also in:
lkml
From: Tejun Heo <hidden>
Date: 2017-08-02 18:44:23
Also in:
lkml
Hello, Roman. Generally looks good to me. One minor nit. On Wed, Aug 02, 2017 at 05:55:30PM +0100, Roman Gushchin wrote:
+static ssize_t cgroup_max_descendants_write(struct kernfs_open_file *of,
+ char *buf, size_t nbytes, loff_t off)
+{
+ struct cgroup *cgrp;
+ int descendants;
+ ssize_t ret;
+
+ buf = strstrip(buf);
+ if (!strcmp(buf, "max")) {
+ descendants = INT_MAX;
+ } else {
+ ret = kstrtouint(buf, 0, &descendants);^^^^^^^^^^^ shouldn't this be kstrtoint? Thanks. -- tejun