Lines Matching refs:thpsize

683 static struct thpsize *thpsize_create(int order, struct kobject *parent)  in thpsize_create()
686 struct thpsize *thpsize; in thpsize_create() local
689 thpsize = kzalloc(sizeof(*thpsize), GFP_KERNEL); in thpsize_create()
690 if (!thpsize) in thpsize_create()
693 thpsize->order = order; in thpsize_create()
695 ret = kobject_init_and_add(&thpsize->kobj, &thpsize_ktype, parent, in thpsize_create()
698 kfree(thpsize); in thpsize_create()
703 ret = sysfs_add_group(&thpsize->kobj, &any_ctrl_attr_grp); in thpsize_create()
707 ret = sysfs_add_group(&thpsize->kobj, &any_stats_attr_grp); in thpsize_create()
712 ret = sysfs_add_group(&thpsize->kobj, &anon_ctrl_attr_grp); in thpsize_create()
716 ret = sysfs_add_group(&thpsize->kobj, &anon_stats_attr_grp); in thpsize_create()
722 ret = sysfs_add_group(&thpsize->kobj, &file_ctrl_attr_grp); in thpsize_create()
726 ret = sysfs_add_group(&thpsize->kobj, &file_stats_attr_grp); in thpsize_create()
731 return thpsize; in thpsize_create()
733 kobject_put(&thpsize->kobj); in thpsize_create()
746 struct thpsize *thpsize; in hugepage_init_sysfs() local
779 thpsize = thpsize_create(order, *hugepage_kobj); in hugepage_init_sysfs()
780 if (IS_ERR(thpsize)) { in hugepage_init_sysfs()
782 err = PTR_ERR(thpsize); in hugepage_init_sysfs()
785 list_add(&thpsize->node, &thpsize_list); in hugepage_init_sysfs()
803 struct thpsize *thpsize, *tmp; in hugepage_exit_sysfs() local
805 list_for_each_entry_safe(thpsize, tmp, &thpsize_list, node) { in hugepage_exit_sysfs()
806 list_del(&thpsize->node); in hugepage_exit_sysfs()
807 kobject_put(&thpsize->kobj); in hugepage_exit_sysfs()