summaryrefslogtreecommitdiffstats
path: root/fs/ext4/super.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2012-08-17 10:04:17 -0400
committerTheodore Ts'o <tytso@mit.edu>2012-08-17 10:04:17 -0400
commit0e376b1e3ccedee49cb8cc6b652fbc1e7c15eeef (patch)
tree9b461294e91e2995ed31366d4faf77e0b03accd7 /fs/ext4/super.c
parent15c006a22f8e004afbce42a54c878162355f1587 (diff)
downloadop-kernel-dev-0e376b1e3ccedee49cb8cc6b652fbc1e7c15eeef.zip
op-kernel-dev-0e376b1e3ccedee49cb8cc6b652fbc1e7c15eeef.tar.gz
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=27912 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r--fs/ext4/super.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 0423e2e..3ab798d 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -5285,8 +5285,10 @@ static int __init ext4_init_fs(void)
if (err)
goto out6;
ext4_kset = kset_create_and_add("ext4", NULL, fs_kobj);
- if (!ext4_kset)
+ if (!ext4_kset) {
+ err = -ENOMEM;
goto out5;
+ }
ext4_proc_root = proc_mkdir("fs/ext4", NULL);
err = ext4_init_feat_adverts();
OpenPOWER on IntegriCloud