mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
cgroup: don't put ERR_PTR() into fc->root
the caller of ->get_tree() expects NULL left there on error... Reported-by: Thibaut Sautereau <[email protected]> Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
03ad0d703d
commit
630faf81b3
1 changed files with 3 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue