patch-2.3.99-pre4 linux/kernel/exit.c

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

diff -u --recursive --new-file v2.3.99-pre3/linux/kernel/exit.c linux/kernel/exit.c
@@ -216,7 +216,9 @@
 		tsk->fs = NULL;
 		if (atomic_dec_and_test(&fs->count)) {
 			dput(fs->root);
+			mntput(fs->rootmnt);
 			dput(fs->pwd);
+			mntput(fs->pwdmnt);
 			kfree(fs);
 		}
 	}
@@ -414,12 +416,12 @@
 #ifdef CONFIG_BSD_PROCESS_ACCT
 	acct_process(code);
 #endif
-	task_lock(tsk);
 	sem_exit();
 	__exit_mm(tsk);
 	__exit_files(tsk);
 	__exit_fs(tsk);
 	__exit_sighand(tsk);
+	task_lock(tsk);
 	exit_thread();
 	tsk->state = TASK_ZOMBIE;
 	tsk->exit_code = code;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)