summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_descrip.c
diff options
context:
space:
mode:
authordyson <dyson@FreeBSD.org>1998-02-15 04:17:09 +0000
committerdyson <dyson@FreeBSD.org>1998-02-15 04:17:09 +0000
commitfbe6fe8df622ec2f41d4c28cf3cb1849007a8239 (patch)
treef9729ef6b9322722362278acc06d2f4c6b5c3a4a /sys/kern/kern_descrip.c
parent09f4c257137ec70d7900d80b88bc4220fc799c2d (diff)
downloadFreeBSD-src-fbe6fe8df622ec2f41d4c28cf3cb1849007a8239.zip
FreeBSD-src-fbe6fe8df622ec2f41d4c28cf3cb1849007a8239.tar.gz
Make the rootdir handling more consistent. Now, processes always
have a root vnode associated with them, and no special checks for the null case are needed. Submitted by: terry@freebsd.org
Diffstat (limited to 'sys/kern/kern_descrip.c')
-rw-r--r--sys/kern/kern_descrip.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index 2918c3c25..50af896 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_descrip.c 8.6 (Berkeley) 4/19/94
- * $Id: kern_descrip.c,v 1.49 1998/02/04 22:32:31 eivind Exp $
+ * $Id: kern_descrip.c,v 1.50 1998/02/06 12:13:22 eivind Exp $
*/
#include "opt_compat.h"
@@ -709,8 +709,7 @@ fdinit(p)
newfdp->fd_fd.fd_cdir = fdp->fd_cdir;
VREF(newfdp->fd_fd.fd_cdir);
newfdp->fd_fd.fd_rdir = fdp->fd_rdir;
- if (newfdp->fd_fd.fd_rdir)
- VREF(newfdp->fd_fd.fd_rdir);
+ VREF(newfdp->fd_fd.fd_rdir);
/* Create the file descriptor table. */
newfdp->fd_fd.fd_refcnt = 1;
@@ -757,8 +756,7 @@ fdcopy(p)
M_FILEDESC, M_WAITOK);
bcopy(fdp, newfdp, sizeof(struct filedesc));
VREF(newfdp->fd_cdir);
- if (newfdp->fd_rdir)
- VREF(newfdp->fd_rdir);
+ VREF(newfdp->fd_rdir);
newfdp->fd_refcnt = 1;
/*
@@ -821,8 +819,7 @@ fdfree(p)
if (fdp->fd_nfiles > NDFILE)
FREE(fdp->fd_ofiles, M_FILEDESC);
vrele(fdp->fd_cdir);
- if (fdp->fd_rdir)
- vrele(fdp->fd_rdir);
+ vrele(fdp->fd_rdir);
FREE(fdp, M_FILEDESC);
}
OpenPOWER on IntegriCloud