]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
staging: lustre: ldlm: Remove a attribute group from a kobject
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Sat, 25 Nov 2017 06:39:29 +0000 (12:09 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Nov 2017 13:14:44 +0000 (14:14 +0100)
All attribute group created during ldlm_setup() should be removed
in ldlm_cleanup().

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c

index 2d5a2c932ddc80d40c3842d287e3f63c0638f7fb..ada50b69c5f6e06beec5e9e008f01e7e6501df96 100644 (file)
@@ -1093,8 +1093,10 @@ static int ldlm_cleanup(void)
                kset_unregister(ldlm_ns_kset);
        if (ldlm_svc_kset)
                kset_unregister(ldlm_svc_kset);
-       if (ldlm_kobj)
+       if (ldlm_kobj) {
+               sysfs_remove_group(ldlm_kobj, &ldlm_attr_group);
                kobject_put(ldlm_kobj);
+       }
 
        ldlm_debugfs_cleanup();