Пример #1
0
static int __init init_f2fs_fs(void)
{
	int err;

	err = init_inodecache();
	if (err)
		goto fail;
	err = create_node_manager_caches();
	if (err)
		goto free_inodecache;
	err = create_segment_manager_caches();
	if (err)
		goto free_node_manager_caches;
	err = create_gc_caches();
	if (err)
		goto free_segment_manager_caches;
	err = create_checkpoint_caches();
	if (err)
		goto free_gc_caches;
	f2fs_kset = kset_create_and_add("f2fs", NULL, fs_kobj);
	if (!f2fs_kset) {
		err = -ENOMEM;
		goto free_checkpoint_caches;
	}
	err = register_filesystem(&f2fs_fs_type);
	if (err)
		goto free_kset;
	f2fs_create_root_stats();
	f2fs_proc_root = proc_mkdir("fs/f2fs", NULL);
	return 0;

free_kset:
	kset_unregister(f2fs_kset);
free_checkpoint_caches:
	destroy_checkpoint_caches();
free_gc_caches:
	destroy_gc_caches();
free_segment_manager_caches:
	destroy_segment_manager_caches();
free_node_manager_caches:
	destroy_node_manager_caches();
free_inodecache:
	destroy_inodecache();
fail:
	return err;
}
Пример #2
0
static int __init init_f2fs_fs(void)
{
	if (init_inodecache())
		goto fail;
	if (create_node_manager_caches())
		goto fail;
	if (create_gc_caches())
		goto fail;
	if (create_checkpoint_caches())
		goto fail;
	if (register_filesystem(&f2fs_fs_type))
		return -EBUSY;

	f2fs_proc_root = proc_mkdir("fs/f2fs", NULL);
	return 0;
fail:
	return -ENOMEM;
}
Пример #3
0
static int __init init_f2fs_fs(void)
{
	int err;

	err = init_inodecache();
	if (err)
		goto fail;
	err = create_node_manager_caches();
	if (err)
		goto fail;
	err = create_gc_caches();
	if (err)
		goto fail;
	err = create_checkpoint_caches();
	if (err)
		goto fail;
	err = register_filesystem(&f2fs_fs_type);
	if (err)
		goto fail;
	f2fs_create_root_stats();
fail:
	return err;
}