Don't (re)initialize f_gcflag to zero.
Move initialization of DTYPE_VNODE specific field f_seqcount into the DTYPE_VNODE specific code.
This commit is contained in:
parent
c066b8920e
commit
eaaca5deee
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=116601
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user