Update patch add-better-range-checking-for-xattr-value-sizes
[ext4-patch-queue.git] / null-out-kobject-during-sysfs-cleanup
blob4dfa04f81ed24bff9efcbe10746743ee6346b2e4
1 ext4: null out kobject* during sysfs cleanup
3 From: Tyson Nottingham <tgnottingham@gmail.com>
5 Make cleanup of ext4_feat kobject consistent with similar objects.
7 Signed-off-by: Tyson Nottingham <tgnottingham@gmail.com>
8 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
9 ---
10  fs/ext4/sysfs.c | 2 ++
11  1 file changed, 2 insertions(+)
13 diff --git a/fs/ext4/sysfs.c b/fs/ext4/sysfs.c
14 index 1205261..aa8165e 100644
15 --- a/fs/ext4/sysfs.c
16 +++ b/fs/ext4/sysfs.c
17 @@ -464,6 +464,7 @@ int __init ext4_init_sysfs(void)
19  feat_err:
20         kobject_put(ext4_feat);
21 +       ext4_feat = NULL;
22  kset_err:
23         kset_unregister(ext4_kset);
24         ext4_kset = NULL;
25 @@ -473,6 +474,7 @@ int __init ext4_init_sysfs(void)
26  void ext4_exit_sysfs(void)
27  {
28         kobject_put(ext4_feat);
29 +       ext4_feat = NULL;
30         kset_unregister(ext4_kset);
31         ext4_kset = NULL;
32         remove_proc_entry(proc_dirname, NULL);
33 -- 
34 2.7.4