diff options
author | Filipe David Borba Manana <fdmanana@gmail.com> | 2014-02-01 16:27:56 -0500 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-02-03 12:01:28 -0500 |
commit | 60efa5eb2e886852a0d5f9e1ffa7c896a1099da8 (patch) | |
tree | 98eb793d5c46e43b1c9fe6dcceeee62a091aebfe | |
parent | 0b947aff1599afbbd2ec07ada87b05af0f94cf10 (diff) |
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: Ahmet Inan <ainan@mathematik.uni-freiburg.de>
Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
Signed-off-by: Chris Mason <clm@fb.com>
-rw-r--r-- | fs/btrfs/super.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index c02f63356895..97cc24198554 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c | |||
@@ -1996,7 +1996,7 @@ static void __exit exit_btrfs_fs(void) | |||
1996 | btrfs_hash_exit(); | 1996 | btrfs_hash_exit(); |
1997 | } | 1997 | } |
1998 | 1998 | ||
1999 | module_init(init_btrfs_fs) | 1999 | late_initcall(init_btrfs_fs); |
2000 | module_exit(exit_btrfs_fs) | 2000 | module_exit(exit_btrfs_fs) |
2001 | 2001 | ||
2002 | MODULE_LICENSE("GPL"); | 2002 | MODULE_LICENSE("GPL"); |