Re: [PATCH v4 12/18] x86/intel_rdt: Add "info" files to resctrl file system

From: Thomas Gleixner
Date: Mon Oct 17 2016 - 15:49:14 EST


On Fri, 14 Oct 2016, Fenghua Yu wrote:
> static int __init rdtgroup_setup_root(void)
> {
> + int ret;
> +
> rdt_root = kernfs_create_root(&rdtgroup_kf_syscall_ops,
> KERNFS_ROOT_CREATE_DEACTIVATED,
> &rdtgroup_default);
> @@ -193,7 +364,9 @@ static int __init rdtgroup_setup_root(void)
> list_add(&rdtgroup_default.rdtgroup_list, &rdt_all_groups);
>
> rdtgroup_default.kn = rdt_root->kn;
> - kernfs_activate(rdtgroup_default.kn);
> + ret = rdtgroup_create_info_dir(rdtgroup_default.kn);
> + if (!ret)
> + kernfs_activate(rdtgroup_default.kn);
>
> mutex_unlock(&rdtgroup_mutex);

So this is followed by:

return 0;

which means that an error in rdtgroup_create_info_dir() is ignored. As a
consequence the mount point is created and the file system is registered
w/o the info directory....

Thanks,

tglx