patch-2.4.0-test3 linux/kernel/exit.c
Next file: linux/kernel/fork.c
Previous file: linux/kernel/exec_domain.c
Back to the patch index
Back to the overall index
- Lines: 32
- Date:
Mon Jul 10 13:02:55 2000
- Orig file:
v2.4.0-test2/linux/kernel/exit.c
- Orig date:
Fri Jun 23 21:55:23 2000
diff -u --recursive --new-file v2.4.0-test2/linux/kernel/exit.c linux/kernel/exit.c
@@ -55,8 +55,8 @@
* was given away by the parent in the first place.)
*/
current->counter += p->counter;
- if (current->counter >= current->priority*2)
- current->counter = current->priority*2-1;
+ if (current->counter >= MAX_COUNTER)
+ current->counter = MAX_COUNTER;
free_task_struct(p);
} else {
printk("task releasing itself\n");
@@ -217,6 +217,7 @@
}
static inline void __put_fs_struct(struct fs_struct *fs)
{
+ /* No need to hold fs->lock if we are killing it */
if (atomic_dec_and_test(&fs->count)) {
dput(fs->root);
mntput(fs->rootmnt);
@@ -437,11 +438,11 @@
tsk->flags |= PF_EXITING;
del_timer_sync(&tsk->real_timer);
- lock_kernel();
fake_volatile:
#ifdef CONFIG_BSD_PROCESS_ACCT
acct_process(code);
#endif
+ lock_kernel();
sem_exit();
__exit_mm(tsk);
__exit_files(tsk);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)