Unverified Commit 154aa681 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!14512 f2fs: fix null-ptr-deref in f2fs_submit_page_bio()

parents 6556276e 569f0993
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -4116,9 +4116,6 @@ static int __init init_f2fs_fs(void)
	err = register_shrinker(&f2fs_shrinker_info);
	if (err)
		goto free_sysfs;
	err = register_filesystem(&f2fs_fs_type);
	if (err)
		goto free_shrinker;
	f2fs_create_root_stats();
	err = f2fs_init_post_read_processing();
	if (err)
@@ -4135,7 +4132,12 @@ static int __init init_f2fs_fs(void)
	err = f2fs_init_compress_cache();
	if (err)
		goto free_compress_mempool;
	err = register_filesystem(&f2fs_fs_type);
	if (err)
		goto free_compress_cache;
	return 0;
free_compress_cache:
	f2fs_destroy_compress_cache();
free_compress_mempool:
	f2fs_destroy_compress_mempool();
free_bioset:
@@ -4146,8 +4148,6 @@ static int __init init_f2fs_fs(void)
	f2fs_destroy_post_read_processing();
free_root_stats:
	f2fs_destroy_root_stats();
	unregister_filesystem(&f2fs_fs_type);
free_shrinker:
	unregister_shrinker(&f2fs_shrinker_info);
free_sysfs:
	f2fs_exit_sysfs();
@@ -4171,13 +4171,13 @@ static int __init init_f2fs_fs(void)

static void __exit exit_f2fs_fs(void)
{
	unregister_filesystem(&f2fs_fs_type);
	f2fs_destroy_compress_cache();
	f2fs_destroy_compress_mempool();
	f2fs_destroy_bioset();
	f2fs_destroy_bio_entry_cache();
	f2fs_destroy_post_read_processing();
	f2fs_destroy_root_stats();
	unregister_filesystem(&f2fs_fs_type);
	unregister_shrinker(&f2fs_shrinker_info);
	f2fs_exit_sysfs();
	f2fs_destroy_garbage_collection_cache();