From 98f4e5dca8a624ce87aea7396cb0d9028f58c53a Mon Sep 17 00:00:00 2001 From: phk Date: Mon, 15 Nov 2004 21:26:13 +0000 Subject: [PATCH] Next FILEDESC_LOCK properly around FILE_LOCK --- sys/kern/vfs_extattr.c | 4 ++-- sys/kern/vfs_syscalls.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c index d006e3fa01e..1fa588f0958 100644 --- a/sys/kern/vfs_extattr.c +++ b/sys/kern/vfs_extattr.c @@ -1015,8 +1015,8 @@ kern_open(struct thread *td, char *path, enum uio_seg pathseg, int flags, if (fp->f_count == 1) { KASSERT(fdp->fd_ofiles[indx] != fp, ("Open file descriptor lost all refs")); - FILEDESC_UNLOCK(fdp); FILE_UNLOCK(fp); + FILEDESC_UNLOCK(fdp); VOP_UNLOCK(vp, 0, td); vn_close(vp, flags & FMASK, fp->f_cred, td); mtx_unlock(&Giant); @@ -1032,8 +1032,8 @@ kern_open(struct thread *td, char *path, enum uio_seg pathseg, int flags, 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); + FILEDESC_UNLOCK(fdp); /* assert that vn_open created a backing object if one is needed */ KASSERT(!vn_canvmio(vp) || VOP_GETVOBJECT(vp, NULL) == 0, diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index d006e3fa01e..1fa588f0958 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1015,8 +1015,8 @@ kern_open(struct thread *td, char *path, enum uio_seg pathseg, int flags, if (fp->f_count == 1) { KASSERT(fdp->fd_ofiles[indx] != fp, ("Open file descriptor lost all refs")); - FILEDESC_UNLOCK(fdp); FILE_UNLOCK(fp); + FILEDESC_UNLOCK(fdp); VOP_UNLOCK(vp, 0, td); vn_close(vp, flags & FMASK, fp->f_cred, td); mtx_unlock(&Giant); @@ -1032,8 +1032,8 @@ kern_open(struct thread *td, char *path, enum uio_seg pathseg, int flags, 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); + FILEDESC_UNLOCK(fdp); /* assert that vn_open created a backing object if one is needed */ KASSERT(!vn_canvmio(vp) || VOP_GETVOBJECT(vp, NULL) == 0, -- 2.45.2