예제 #1
0
파일: mount.c 프로젝트: Chong-Li/cse522
static void __exit configfs_exit(void)
{
	unregister_filesystem(&configfs_fs_type);
	sysfs_remove_mount_point(kernel_kobj, "config");
	kmem_cache_destroy(configfs_dir_cachep);
	configfs_dir_cachep = NULL;
}
예제 #2
0
파일: mount.c 프로젝트: Chong-Li/cse522
static int __init configfs_init(void)
{
	int err = -ENOMEM;

	configfs_dir_cachep = kmem_cache_create("configfs_dir_cache",
						sizeof(struct configfs_dirent),
						0, 0, NULL);
	if (!configfs_dir_cachep)
		goto out;

	err = sysfs_create_mount_point(kernel_kobj, "config");
	if (err)
		goto out2;

	err = register_filesystem(&configfs_fs_type);
	if (err)
		goto out3;

	return 0;
out3:
	pr_err("Unable to register filesystem!\n");
	sysfs_remove_mount_point(kernel_kobj, "config");
out2:
	kmem_cache_destroy(configfs_dir_cachep);
	configfs_dir_cachep = NULL;
out:
	return err;
}
예제 #3
0
파일: inode.c 프로젝트: ifilex/sensa
static void __exit hypfs_exit(void)
{
	unregister_filesystem(&hypfs_type);
	sysfs_remove_mount_point(hypervisor_kobj, "s390");
	hypfs_diag0c_exit();
	hypfs_sprp_exit();
	hypfs_vm_exit();
	hypfs_diag_exit();
	hypfs_dbfs_exit();
}
예제 #4
0
파일: inode.c 프로젝트: h4ck3rm1k3/linux
static int __init securityfs_init(void)
{
	int retval;

	retval = sysfs_create_mount_point(kernel_kobj, "security");
	if (retval)
		return retval;

	retval = register_filesystem(&fs_type);
	if (retval)
		sysfs_remove_mount_point(kernel_kobj, "security");
	return retval;
}
예제 #5
0
파일: inode.c 프로젝트: AK101111/linux
static int __init bpf_init(void)
{
	int ret;

	ret = sysfs_create_mount_point(fs_kobj, "bpf");
	if (ret)
		return ret;

	ret = register_filesystem(&bpf_fs_type);
	if (ret)
		sysfs_remove_mount_point(fs_kobj, "bpf");

	return ret;
}
예제 #6
0
파일: inode.c 프로젝트: ifilex/sensa
static int __init hypfs_init(void)
{
	int rc;

	rc = hypfs_dbfs_init();
	if (rc)
		return rc;
	if (hypfs_diag_init()) {
		rc = -ENODATA;
		goto fail_dbfs_exit;
	}
	if (hypfs_vm_init()) {
		rc = -ENODATA;
		goto fail_hypfs_diag_exit;
	}
	if (hypfs_sprp_init()) {
		rc = -ENODATA;
		goto fail_hypfs_vm_exit;
	}
	if (hypfs_diag0c_init()) {
		rc = -ENODATA;
		goto fail_hypfs_sprp_exit;
	}
	rc = sysfs_create_mount_point(hypervisor_kobj, "s390");
	if (rc)
		goto fail_hypfs_diag0c_exit;
	rc = register_filesystem(&hypfs_type);
	if (rc)
		goto fail_filesystem;
	return 0;

fail_filesystem:
	sysfs_remove_mount_point(hypervisor_kobj, "s390");
fail_hypfs_diag0c_exit:
	hypfs_diag0c_exit();
fail_hypfs_sprp_exit:
	hypfs_sprp_exit();
fail_hypfs_vm_exit:
	hypfs_vm_exit();
fail_hypfs_diag_exit:
	hypfs_diag_exit();
fail_dbfs_exit:
	hypfs_dbfs_exit();
	pr_err("Initialization of hypfs failed with rc=%i\n", rc);
	return rc;
}