]> Pileus Git - ~andy/linux/blobdiff - kernel/sched/auto_group.c
Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
[~andy/linux] / kernel / sched / auto_group.c
index 64de5f8b0c9ed654ec475c2cae33fe539a1d43ca..4a073539c58e69992ed2133a73444ceffc9cd3fa 100644 (file)
@@ -77,8 +77,6 @@ static inline struct autogroup *autogroup_create(void)
        if (IS_ERR(tg))
                goto out_free;
 
-       sched_online_group(tg, &root_task_group);
-
        kref_init(&ag->kref);
        init_rwsem(&ag->lock);
        ag->id = atomic_inc_return(&autogroup_seq_nr);
@@ -98,6 +96,7 @@ static inline struct autogroup *autogroup_create(void)
 #endif
        tg->autogroup = ag;
 
+       sched_online_group(tg, &root_task_group);
        return ag;
 
 out_free: