Skip to content

Commit 2f6c6d0

Browse files
committed
Merge branch 'for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
Pull cgroup updates from Tejun Heo: "Two minor changes. One makes cgroup interface files ignore zero-sized writes rather than triggering -EINVAL on them. The other change is a cleanup which doesn't cause any behavior changes" * 'for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: Zero sized write should be no-op cgroup: remove redundant kernfs_activate in cgroup_setup_root()
2 parents 09cad07 + 65026da commit 2f6c6d0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

kernel/cgroup/cgroup.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2006,7 +2006,6 @@ int cgroup_setup_root(struct cgroup_root *root, u16 ss_mask)
20062006
BUG_ON(!list_empty(&root_cgrp->self.children));
20072007
BUG_ON(atomic_read(&root->nr_cgrps) != 1);
20082008

2009-
kernfs_activate(root_cgrp->kn);
20102009
ret = 0;
20112010
goto out;
20122011

@@ -3682,6 +3681,9 @@ static ssize_t cgroup_file_write(struct kernfs_open_file *of, char *buf,
36823681
struct cgroup_subsys_state *css;
36833682
int ret;
36843683

3684+
if (!nbytes)
3685+
return 0;
3686+
36853687
/*
36863688
* If namespaces are delegation boundaries, disallow writes to
36873689
* files in an non-init namespace root from inside the namespace

0 commit comments

Comments
 (0)