diff options
-rw-r--r-- | sys/kern/uipc_syscalls.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index 2762b4f..53e82ce 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -1742,12 +1742,11 @@ do_sendfile(struct thread *td, struct sendfile_args *uap, int compat) if ((error = fgetvp_read(td, uap->fd, &vp)) != 0) goto done; vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); + VOP_UNLOCK(vp, 0, td); if (vp->v_type != VREG || VOP_GETVOBJECT(vp, &obj) != 0) { error = EINVAL; - VOP_UNLOCK(vp, 0, td); goto done; } - VOP_UNLOCK(vp, 0, td); if ((error = fgetsock(td, uap->s, &so, NULL)) != 0) goto done; if (so->so_type != SOCK_STREAM) { |