Commit 0e376b1e authored by Theodore Ts'o's avatar Theodore Ts'o

ext4: return an error if kset_create_and_add fails in ext4_init_fs()

In the very unlikely case that kset_create_and_add() fails when the
ext4.ko module is being loaded (or during kernel startup) set err so
that it's clear that the module load failed.

https://bugzilla.kernel.org/show_bug.cgi?id=27912Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent 15c006a2
...@@ -5285,8 +5285,10 @@ static int __init ext4_init_fs(void) ...@@ -5285,8 +5285,10 @@ static int __init ext4_init_fs(void)
if (err) if (err)
goto out6; goto out6;
ext4_kset = kset_create_and_add("ext4", NULL, fs_kobj); ext4_kset = kset_create_and_add("ext4", NULL, fs_kobj);
if (!ext4_kset) if (!ext4_kset) {
err = -ENOMEM;
goto out5; goto out5;
}
ext4_proc_root = proc_mkdir("fs/ext4", NULL); ext4_proc_root = proc_mkdir("fs/ext4", NULL);
err = ext4_init_feat_adverts(); err = ext4_init_feat_adverts();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment