提交 60efa5eb 编写于 作者: F Filipe David Borba Manana 提交者: Chris Mason

Btrfs: use late_initcall instead of module_init

It seems that when init_btrfs_fs() is called, crc32c/crc32c-intel might
not always be already initialized, which results in the call to crypto_alloc_shash()
returning -ENOENT, as experienced by Ahmet who reported this.

Therefore make sure init_btrfs_fs() is called after crc32c is initialized (which
is at initialization level 6, module_init), by using late_initcall (which is at
initialization level 7) instead of module_init for btrfs.
Reported-and-Tested-by: NAhmet Inan <ainan@mathematik.uni-freiburg.de>
Signed-off-by: NFilipe David Borba Manana <fdmanana@gmail.com>
Signed-off-by: NChris Mason <clm@fb.com>
上级 0b947aff
...@@ -1996,7 +1996,7 @@ static void __exit exit_btrfs_fs(void) ...@@ -1996,7 +1996,7 @@ static void __exit exit_btrfs_fs(void)
btrfs_hash_exit(); btrfs_hash_exit();
} }
module_init(init_btrfs_fs) late_initcall(init_btrfs_fs);
module_exit(exit_btrfs_fs) module_exit(exit_btrfs_fs)
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册