Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

time: use ns_common_init()

Don't cargo-cult the same thing over and over.

Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Christian Brauner <brauner@kernel.org>

+2 -5
+2 -5
kernel/time/namespace.c
··· 88 88 goto fail; 89 89 90 90 err = -ENOMEM; 91 - ns = kmalloc(sizeof(*ns), GFP_KERNEL_ACCOUNT); 91 + ns = kzalloc(sizeof(*ns), GFP_KERNEL_ACCOUNT); 92 92 if (!ns) 93 93 goto fail_dec; 94 - 95 - refcount_set(&ns->ns.count, 1); 96 94 97 95 ns->vvar_page = alloc_page(GFP_KERNEL_ACCOUNT | __GFP_ZERO); 98 96 if (!ns->vvar_page) 99 97 goto fail_free; 100 98 101 - err = ns_alloc_inum(&ns->ns); 99 + err = ns_common_init(&ns->ns, &timens_operations, true); 102 100 if (err) 103 101 goto fail_free_page; 104 102 105 103 ns->ucounts = ucounts; 106 - ns->ns.ops = &timens_operations; 107 104 ns->user_ns = get_user_ns(user_ns); 108 105 ns->offsets = old_ns->offsets; 109 106 ns->frozen_offsets = false;