Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fb7dde37ece82e13de383afd7042c45df67a9d17
Commit:     fb7dde37ece82e13de383afd7042c45df67a9d17
Parent:     178be793485d70d871a0fd46b29e9e3e7da636ad
Author:     Srivatsa Vaddagiri <[EMAIL PROTECTED]>
AuthorDate: Mon Oct 15 17:00:18 2007 +0200
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Mon Oct 15 17:00:18 2007 +0200

    sched: generate uevents for user creation/destruction
    
    Generate uevents when a user is being created/destroyed. These events
    can be used to configure cpu share of a new user.
    
    Signed-off-by: Srivatsa Vaddagiri <[EMAIL PROTECTED]>
    Signed-off-by: Dhaval Giani <[EMAIL PROTECTED]>
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
---
 kernel/user.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/kernel/user.c b/kernel/user.c
index 74cadea..f0e561e 100644
--- a/kernel/user.c
+++ b/kernel/user.c
@@ -174,6 +174,8 @@ static int user_kobject_create(struct user_struct *up)
        if (error)
                kobject_del(kobj);
 
+       kobject_uevent(kobj, KOBJ_ADD);
+
 done:
        return error;
 }
@@ -189,6 +191,7 @@ int __init uids_kobject_init(void)
 
        /* create under /sys/kernel dir */
        uids_kobject.parent = &kernel_subsys.kobj;
+       uids_kobject.kset = &kernel_subsys;
        kobject_set_name(&uids_kobject, "uids");
        kobject_init(&uids_kobject);
 
@@ -228,6 +231,7 @@ static void remove_user_sysfs_dir(struct work_struct *w)
                goto done;
 
        sysfs_remove_file(kobj, &up->user_attr.attr);
+       kobject_uevent(kobj, KOBJ_REMOVE);
        kobject_del(kobj);
 
        sched_destroy_user(up);
-
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