author: Al Viro <viro@zeniv.linux.org.uk> 2019-05-12 12:42:58 -0400
committer: Al Viro <viro@zeniv.linux.org.uk> 2019-05-25 17:59:54 -0400
commit: f7a9945184100b531f0de3b12c617a349236dd8a
parent: 1f58bb18f6f28d1df0b7144d90bc90ee5672416d
Commit Summary:
Diffstat:
1 file changed, 1 insertion, 2 deletions
diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c
index 1b56686ab178..db81cfbab9d6 100644
--- a/fs/sysfs/mount.c
+++ b/fs/sysfs/mount.c
@@ -72,8 +72,7 @@ static int sysfs_init_fs_context(struct fs_context *fc)
fc->fs_private = kfc;
fc->ops = &sysfs_fs_context_ops;
if (netns) {
- if (fc->user_ns)
- put_user_ns(fc->user_ns);
+ put_user_ns(fc->user_ns);
fc->user_ns = get_user_ns(netns->user_ns);
}
fc->global = true;