Unverified Commit 1cf2435b authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

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

parents 604e996d 43b05af5
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -4919,9 +4919,6 @@ static int __init init_f2fs_fs(void)
	err = register_shrinker(&f2fs_shrinker_info, "f2fs-shrinker");
	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)
@@ -4944,7 +4941,12 @@ static int __init init_f2fs_fs(void)
	err = f2fs_create_casefold_cache();
	if (err)
		goto free_compress_cache;
	err = register_filesystem(&f2fs_fs_type);
	if (err)
		goto free_casefold_cache;
	return 0;
free_casefold_cache:
	f2fs_destroy_casefold_cache();
free_compress_cache:
	f2fs_destroy_compress_cache();
free_compress_mempool:
@@ -4959,8 +4961,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();
@@ -4984,6 +4984,7 @@ static int __init init_f2fs_fs(void)

static void __exit exit_f2fs_fs(void)
{
	unregister_filesystem(&f2fs_fs_type);
	f2fs_destroy_casefold_cache();
	f2fs_destroy_compress_cache();
	f2fs_destroy_compress_mempool();
@@ -4992,7 +4993,6 @@ static void __exit exit_f2fs_fs(void)
	f2fs_destroy_iostat_processing();
	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();