diff options
author | alfred <alfred@FreeBSD.org> | 2003-01-01 00:35:46 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2003-01-01 00:35:46 +0000 |
commit | b3883074cb4bda7291c2a017dae9f062be0f7b57 (patch) | |
tree | 63aa97a44f416a9533f7e34488f8d3d913757c3e /sys/kern/kern_descrip.c | |
parent | c28c69ebf9a0a85c7e9e76bbd63b981aa8478a41 (diff) | |
download | FreeBSD-src-b3883074cb4bda7291c2a017dae9f062be0f7b57.zip FreeBSD-src-b3883074cb4bda7291c2a017dae9f062be0f7b57.tar.gz |
fdinit() does not need to lock the filedesc it is creating as no one
besideds itself has access until the function returns.
Diffstat (limited to 'sys/kern/kern_descrip.c')
-rw-r--r-- | sys/kern/kern_descrip.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index fdfe7af..dba34c5 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -1214,7 +1214,6 @@ fdinit(td) MALLOC(newfdp, struct filedesc0 *, sizeof(struct filedesc0), M_FILEDESC, M_WAITOK | M_ZERO); mtx_init(&newfdp->fd_fd.fd_mtx, FILEDESC_LOCK_DESC, NULL, MTX_DEF); - FILEDESC_LOCK(&newfdp->fd_fd); newfdp->fd_fd.fd_cdir = fdp->fd_cdir; if (newfdp->fd_fd.fd_cdir) VREF(newfdp->fd_fd.fd_cdir); @@ -1232,8 +1231,6 @@ fdinit(td) newfdp->fd_fd.fd_ofileflags = newfdp->fd_dfileflags; newfdp->fd_fd.fd_nfiles = NDFILE; newfdp->fd_fd.fd_knlistsize = -1; - FILEDESC_UNLOCK(&newfdp->fd_fd); - return (&newfdp->fd_fd); } |