archive mirror
 help / color / mirror / Atom feed
* [PATCH] cgroup: Always apply root flags on successful tree creation
@ 2019-01-02 22:30 David Howells
  0 siblings, 0 replies; only message in thread
From: David Howells @ 2019-01-02 22:30 UTC (permalink / raw)
  To: viro; +Cc: Andrei Vagin, dhowells, linux-fsdevel

Always apply the root flags on mounting, both when the superblock is new
and when an already extant superblock is being shared.

Currently there's a bug in commit b3678086951a5 whereby the flags are only
changed if the superblock wasn't new.  The intention was originally to
effect the change for a new superblock by having kernfs_fill_super() call
back into the subclassing filesystem, but that never got completed.

On further reflection, it's possibly better not to do that so that we don't
have to revert the flag change if there's a later failure.

Fixes: b3678086951a ("kernfs, sysfs, cgroup, intel_rdt: Support fs_context")
Reported-by: Al Viro <>
Signed-off-by: David Howells <>
cc: Andrei Vagin <>

 kernel/cgroup/cgroup.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index a19f0fec9d82..ff6627ec1e3e 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -2044,12 +2044,8 @@ int cgroup_do_get_tree(struct fs_context *fc)
 		fc->root = nsdentry;
-	ret = 0;
-	if (ctx->kfc.new_sb_created)
-		goto out_cgrp;
-	return 0;
+	ret = 0;
 	return ret;

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-01-02 22:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-02 22:30 [PATCH] cgroup: Always apply root flags on successful tree creation David Howells

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).