Skip to content

Commit c2e5df7

Browse files
tgnottinghamtytso
authored andcommitted
ext4: null out kobject* during sysfs cleanup
Make cleanup of ext4_feat kobject consistent with similar objects. Signed-off-by: Tyson Nottingham <tgnottingham@gmail.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
1 parent 18db4b4 commit c2e5df7

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎fs/ext4/sysfs.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,7 @@ int __init ext4_init_sysfs(void)
464464

465465
feat_err:
466466
kobject_put(ext4_feat);
467+
ext4_feat = NULL;
467468
kset_err:
468469
kset_unregister(ext4_kset);
469470
ext4_kset = NULL;
@@ -473,6 +474,7 @@ int __init ext4_init_sysfs(void)
473474
void ext4_exit_sysfs(void)
474475
{
475476
kobject_put(ext4_feat);
477+
ext4_feat = NULL;
476478
kset_unregister(ext4_kset);
477479
ext4_kset = NULL;
478480
remove_proc_entry(proc_dirname, NULL);

0 commit comments

Comments
 (0)