Merge to Fedora kernel-2.6.7-1.441
[linux-2.6.git] / kernel / exit.c
index ce724eb..05f2029 100644 (file)
@@ -23,6 +23,8 @@
 #include <linux/mount.h>
 #include <linux/proc_fs.h>
 #include <linux/mempolicy.h>
+#include <linux/vs_limit.h>
+
 #include <linux/ckrm.h>
 #include <linux/ckrm_tsk.h>
 
@@ -42,7 +44,8 @@ static void __unhash_process(struct task_struct *p)
        /* tasklist_lock is held, is this sufficient? */
        if (p->vx_info) {
                atomic_dec(&p->vx_info->cacct.nr_threads);
-               atomic_dec(&p->vx_info->limit.res[RLIMIT_NPROC]);
+               vx_nproc_dec(p->vx_info);
+               // atomic_dec(&p->vx_info->limit.res[RLIMIT_NPROC]);
        }
        detach_pid(p, PIDTYPE_PID);
        detach_pid(p, PIDTYPE_TGID);
@@ -752,7 +755,7 @@ static void exit_notify(struct task_struct *tsk)
         * Clear these here so that update_process_times() won't try to deliver
         * itimer, profile or rlimit signals to this task while it is in late exit.
         */
-       tsk->it_virt_incr = 0;
+       tsk->it_virt_value = 0;
        tsk->it_prof_value = 0;
        tsk->rlim[RLIMIT_CPU].rlim_cur = RLIM_INFINITY;
 
@@ -854,10 +857,10 @@ asmlinkage long sys_exit(int error_code)
        do_exit((error_code&0xff)<<8);
 }
 
-task_t fastcall *next_thread(task_t *p)
+task_t fastcall *next_thread(const task_t *p)
 {
-       struct pid_link *link = p->pids + PIDTYPE_TGID;
-       struct list_head *tmp, *head = &link->pidptr->task_list;
+       const struct pid_link *link = p->pids + PIDTYPE_TGID;
+       const struct list_head *tmp, *head = &link->pidptr->task_list;
 
 #ifdef CONFIG_SMP
        if (!p->sighand)