Commit 630faf81 authored by Al Viro's avatar Al Viro

cgroup: don't put ERR_PTR() into fc->root

the caller of ->get_tree() expects NULL left there on error...
Reported-by: default avatarThibaut Sautereau <thibaut@sautereau.fr>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 03ad0d70
......@@ -2119,11 +2119,12 @@ int cgroup_do_get_tree(struct fs_context *fc)
nsdentry = kernfs_node_dentry(cgrp->kn, sb);
dput(fc->root);
fc->root = nsdentry;
if (IS_ERR(nsdentry)) {
ret = PTR_ERR(nsdentry);
deactivate_locked_super(sb);
ret = PTR_ERR(nsdentry);
nsdentry = NULL;
}
fc->root = nsdentry;
}
if (!ctx->kfc.new_sb_created)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment