[PATCH 06/54] kset: convert securityfs to use kset_create

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dynamically create the kset instead of declaring it statically.

Cc: Kay Sievers <[email protected]>
Acked-by: Chris Wright <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
 security/inode.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/security/inode.c b/security/inode.c
index 9e42f5f..9071d81 100644
--- a/security/inode.c
+++ b/security/inode.c
@@ -315,20 +315,20 @@ void securityfs_remove(struct dentry *dentry)
 }
 EXPORT_SYMBOL_GPL(securityfs_remove);
 
-static decl_subsys(security, NULL);
+static struct kset *security_kset;
 
 static int __init securityfs_init(void)
 {
 	int retval;
 
-	security_subsys.kobj.kset = &kernel_subsys;
-	retval = subsystem_register(&security_subsys);
-	if (retval)
-		return retval;
+	security_kset = kset_create_and_register("security", NULL, NULL,
+						 &kernel_subsys);
+	if (IS_ERR(security_kset))
+		return PTR_ERR(security_kset);
 
 	retval = register_filesystem(&fs_type);
 	if (retval)
-		subsystem_unregister(&security_subsys);
+		kset_unregister(security_kset);
 	return retval;
 }
 
-- 
1.5.3.4

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux