patch-2.1.116 linux/kernel/exit.c

Next file: linux/kernel/fork.c
Previous file: linux/kernel/capability.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.115/linux/kernel/exit.c linux/kernel/exit.c
@@ -52,7 +52,7 @@
 			} while (p->has_cpu);
 		}
 #endif
-		charge_uid(p, -1);
+		free_uid(p);
 		nr_tasks--;
 		add_free_taskslot(p->tarray_ptr);
 
@@ -196,7 +196,7 @@
 
 	if (files) {
 		tsk->files = NULL;
-		if (!--files->count) {
+		if (atomic_dec_and_test(&files->count)) {
 			close_files(files);
 			/*
 			 * Free the fd array as appropriate ...
@@ -221,7 +221,7 @@
 
 	if (fs) {
 		tsk->fs = NULL;
-		if (!--fs->count) {
+		if (atomic_dec_and_test(&fs->count)) {
 			dput(fs->root);
 			dput(fs->pwd);
 			kfree(fs);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov