From 62220473009419055cc8bb54c279c2ffda7de9d4 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Fri, 18 Oct 2002 17:45:41 +0000 Subject: [PATCH] Do not lock the process when calling fdfree() (this would have recursed on a non-recursive lock, the proc lock, before) since we don't need it to change p_fd. --- sys/kern/kern_fork.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 1efb9081df7a..2f93823c115e 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -257,10 +257,8 @@ fork1(td, flags, pages, procp) if (flags & RFCFDG) { struct filedesc *fdtmp; fdtmp = fdinit(td); /* XXXKSE */ - PROC_LOCK(p1); fdfree(td); /* XXXKSE */ p1->p_fd = fdtmp; - PROC_UNLOCK(p1); } /* @@ -273,10 +271,8 @@ fork1(td, flags, pages, procp) newfd = fdcopy(td); FILEDESC_UNLOCK(p1->p_fd); - PROC_LOCK(p1); fdfree(td); p1->p_fd = newfd; - PROC_UNLOCK(p1); } else FILEDESC_UNLOCK(p1->p_fd); }