diff options
Diffstat (limited to 'fs/sysfs/mount.c')
-rw-r--r-- | fs/sysfs/mount.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c index 4cb21b558a85..1b56686ab178 100644 --- a/fs/sysfs/mount.c +++ b/fs/sysfs/mount.c | |||
@@ -71,9 +71,11 @@ static int sysfs_init_fs_context(struct fs_context *fc) | |||
71 | kfc->magic = SYSFS_MAGIC; | 71 | kfc->magic = SYSFS_MAGIC; |
72 | fc->fs_private = kfc; | 72 | fc->fs_private = kfc; |
73 | fc->ops = &sysfs_fs_context_ops; | 73 | fc->ops = &sysfs_fs_context_ops; |
74 | if (fc->user_ns) | 74 | if (netns) { |
75 | put_user_ns(fc->user_ns); | 75 | if (fc->user_ns) |
76 | fc->user_ns = get_user_ns(netns->user_ns); | 76 | put_user_ns(fc->user_ns); |
77 | fc->user_ns = get_user_ns(netns->user_ns); | ||
78 | } | ||
77 | fc->global = true; | 79 | fc->global = true; |
78 | return 0; | 80 | return 0; |
79 | } | 81 | } |