Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9bec101a0c38d559a8c95b44d850cd09a7b4edef
Commit:     9bec101a0c38d559a8c95b44d850cd09a7b4edef
Parent:     00d2666623368ffd39afc875ff8a2eead2a0436c
Author:     Greg Kroah-Hartman <[EMAIL PROTECTED]>
AuthorDate: Mon Oct 29 20:13:17 2007 +0100
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Thu Jan 24 20:40:13 2008 -0800

    kset: convert gfs2 to use kset_create
    
    Dynamically create the kset instead of declaring it statically.
    
    Cc: Kay Sievers <[EMAIL PROTECTED]>
    Cc: Steven Whitehouse <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 fs/gfs2/sys.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c
index a0bdc4a..44cfaae 100644
--- a/fs/gfs2/sys.c
+++ b/fs/gfs2/sys.c
@@ -221,7 +221,7 @@ static struct kobj_type gfs2_ktype = {
        .sysfs_ops     = &gfs2_attr_ops,
 };
 
-static struct kset gfs2_kset;
+static struct kset *gfs2_kset;
 
 /*
  * display struct lm_lockstruct fields
@@ -493,7 +493,7 @@ int gfs2_sys_fs_add(struct gfs2_sbd *sdp)
 {
        int error;
 
-       sdp->sd_kobj.kset = &gfs2_kset;
+       sdp->sd_kobj.kset = gfs2_kset;
        sdp->sd_kobj.ktype = &gfs2_ktype;
 
        error = kobject_set_name(&sdp->sd_kobj, "%s", sdp->sd_table_name);
@@ -548,14 +548,15 @@ int gfs2_sys_init(void)
 {
        gfs2_sys_margs = NULL;
        spin_lock_init(&gfs2_sys_margs_lock);
-       kobject_set_name(&gfs2_kset.kobj, "gfs2");
-       gfs2_kset.kobj.parent = fs_kobj;
-       return kset_register(&gfs2_kset);
+       gfs2_kset = kset_create_and_add("gfs2", NULL, fs_kobj);
+       if (!gfs2_kset)
+               return -ENOMEM;
+       return 0;
 }
 
 void gfs2_sys_uninit(void)
 {
        kfree(gfs2_sys_margs);
-       kset_unregister(&gfs2_kset);
+       kset_unregister(gfs2_kset);
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to