summaryrefslogtreecommitdiff
path: root/sys/kern/vfs_syscalls.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2018-04-27 10:13:38 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2018-04-27 10:13:38 +0000
commit0ac3ea7554a97a8f9ef72f10efc25e2f8f917ec8 (patch)
treed02050300c57902612cbcc1ed93343f51ddde841 /sys/kern/vfs_syscalls.c
parentfb5d6f62930fa92c52d63c3ef27054bb33b04031 (diff)
Move FREF() inside fd_getfile().
ok visa@
Diffstat (limited to 'sys/kern/vfs_syscalls.c')
-rw-r--r--sys/kern/vfs_syscalls.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index a28551acd2f..1051bc271b4 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_syscalls.c,v 1.279 2018/04/03 09:10:02 mpi Exp $ */
+/* $OpenBSD: vfs_syscalls.c,v 1.280 2018/04/27 10:13:37 mpi Exp $ */
/* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */
/*
@@ -745,7 +745,6 @@ sys_fchdir(struct proc *p, void *v, register_t *retval)
if ((fp = fd_getfile(fdp, SCARG(uap, fd))) == NULL)
return (EBADF);
- FREF(fp);
vp = fp->f_data;
if (fp->f_type != DTYPE_VNODE || vp->v_type != VDIR) {
FRELE(fp, p);
@@ -1616,7 +1615,6 @@ sys_lseek(struct proc *p, void *v, register_t *retval)
if ((fp = fd_getfile(fdp, SCARG(uap, fd))) == NULL)
return (EBADF);
- FREF(fp);
vp = fp->f_data;
if (fp->f_type != DTYPE_VNODE || vp->v_type == VFIFO) {
error = ESPIPE;
@@ -2900,7 +2898,6 @@ getvnode(struct proc *p, int fd, struct file **fpp)
if ((fp = fd_getfile(p->p_fd, fd)) == NULL)
return (EBADF);
- FREF(fp);
if (fp->f_type != DTYPE_VNODE) {
FRELE(fp, p);
@@ -2943,7 +2940,6 @@ sys_pread(struct proc *p, void *v, register_t *retval)
if ((fp = fd_getfile_mode(fdp, fd, FREAD)) == NULL)
return (EBADF);
- FREF(fp);
vp = fp->f_data;
if (fp->f_type != DTYPE_VNODE || vp->v_type == VFIFO ||
@@ -2983,7 +2979,6 @@ sys_preadv(struct proc *p, void *v, register_t *retval)
if ((fp = fd_getfile_mode(fdp, fd, FREAD)) == NULL)
return (EBADF);
- FREF(fp);
vp = fp->f_data;
if (fp->f_type != DTYPE_VNODE || vp->v_type == VFIFO ||
@@ -3028,7 +3023,6 @@ sys_pwrite(struct proc *p, void *v, register_t *retval)
if ((fp = fd_getfile_mode(fdp, fd, FWRITE)) == NULL)
return (EBADF);
- FREF(fp);
vp = fp->f_data;
if (fp->f_type != DTYPE_VNODE || vp->v_type == VFIFO ||
@@ -3068,7 +3062,6 @@ sys_pwritev(struct proc *p, void *v, register_t *retval)
if ((fp = fd_getfile_mode(fdp, fd, FWRITE)) == NULL)
return (EBADF);
- FREF(fp);
vp = fp->f_data;
if (fp->f_type != DTYPE_VNODE || vp->v_type == VFIFO ||