summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2019-05-12 18:42:58 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2019-05-25 23:59:54 +0200
commitf7a9945184100b531f0de3b12c617a349236dd8a (patch)
treebe83490fcfad13c338adb4973a72ed923695f249 /kernel
parentmount_pseudo(): drop 'name' argument, switch to d_make_root() (diff)
downloadlinux-f7a9945184100b531f0de3b12c617a349236dd8a.tar.xz
linux-f7a9945184100b531f0de3b12c617a349236dd8a.zip
no need to protect against put_user_ns(NULL)
it's a no-op Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/cgroup/cgroup.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index 217cec4e22c6..bbcdd3457eb0 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -2184,8 +2184,7 @@ static int cgroup_init_fs_context(struct fs_context *fc)
fc->ops = &cgroup_fs_context_ops;
else
fc->ops = &cgroup1_fs_context_ops;
- if (fc->user_ns)
- put_user_ns(fc->user_ns);
+ put_user_ns(fc->user_ns);
fc->user_ns = get_user_ns(ctx->ns->user_ns);
fc->global = true;
return 0;