From eaaca5deee7db4f28e6f3b782618609647b942be Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Fri, 20 Jun 2003 08:02:30 +0000 Subject: Don't (re)initialize f_gcflag to zero. Move initialization of DTYPE_VNODE specific field f_seqcount into the DTYPE_VNODE specific code. --- sys/kern/kern_descrip.c | 2 -- sys/kern/vfs_extattr.c | 1 + sys/kern/vfs_syscalls.c | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/kern') diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 667812ab7b2c..6699e32f04f6 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -1216,11 +1216,9 @@ falloc(td, resultfp, resultfd) * put it at the front of the list of open files. */ fp->f_mtxp = mtx_pool_alloc(); - fp->f_gcflag = 0; fp->f_count = 1; fp->f_cred = crhold(td->td_ucred); fp->f_ops = &badfileops; - fp->f_seqcount = 1; FILEDESC_LOCK(p->p_fd); if ((fq = p->p_fd->fd_ofiles[0])) { LIST_INSERT_AFTER(fq, fp, f_list); diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c index 46ff3aa6a832..30e16fcd06ce 100644 --- a/sys/kern/vfs_extattr.c +++ b/sys/kern/vfs_extattr.c @@ -748,6 +748,7 @@ kern_open(struct thread *td, char *path, enum uio_seg pathseg, int flags, fp->f_data = vp; fp->f_flag = flags & FMASK; fp->f_ops = &vnops; + fp->f_seqcount = 1; fp->f_type = (vp->v_type == VFIFO ? DTYPE_FIFO : DTYPE_VNODE); FILEDESC_UNLOCK(fdp); FILE_UNLOCK(fp); diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 46ff3aa6a832..30e16fcd06ce 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -748,6 +748,7 @@ kern_open(struct thread *td, char *path, enum uio_seg pathseg, int flags, fp->f_data = vp; fp->f_flag = flags & FMASK; fp->f_ops = &vnops; + fp->f_seqcount = 1; fp->f_type = (vp->v_type == VFIFO ? DTYPE_FIFO : DTYPE_VNODE); FILEDESC_UNLOCK(fdp); FILE_UNLOCK(fp); -- cgit v1.2.3