diff --git a/sys/nfs/nfs_lock.c b/sys/nfs/nfs_lock.c index 85bc9d94c881..9e28eeb8a600 100644 --- a/sys/nfs/nfs_lock.c +++ b/sys/nfs/nfs_lock.c @@ -260,8 +260,10 @@ nfslockdans(p, ansp) ((ansp->la_msg_ident.msg_seq != -1) && (timevalcmp(&p->p_nlminfo->pid_start, &ansp->la_msg_ident.pid_start, !=) || - p->p_nlminfo->msg_seq != ansp->la_msg_ident.msg_seq))) + p->p_nlminfo->msg_seq != ansp->la_msg_ident.msg_seq))) { + PROC_UNLOCK(p); return (EPIPE); + } p->p_nlminfo->retcode = ansp->la_errno; p->p_nlminfo->set_getlk_pid = ansp->la_set_getlk_pid; @@ -269,5 +271,6 @@ nfslockdans(p, ansp) (void)wakeup((void *)p->p_nlminfo); + PROC_UNLOCK(p); return (0); } diff --git a/sys/nfsclient/nfs_lock.c b/sys/nfsclient/nfs_lock.c index 85bc9d94c881..9e28eeb8a600 100644 --- a/sys/nfsclient/nfs_lock.c +++ b/sys/nfsclient/nfs_lock.c @@ -260,8 +260,10 @@ nfslockdans(p, ansp) ((ansp->la_msg_ident.msg_seq != -1) && (timevalcmp(&p->p_nlminfo->pid_start, &ansp->la_msg_ident.pid_start, !=) || - p->p_nlminfo->msg_seq != ansp->la_msg_ident.msg_seq))) + p->p_nlminfo->msg_seq != ansp->la_msg_ident.msg_seq))) { + PROC_UNLOCK(p); return (EPIPE); + } p->p_nlminfo->retcode = ansp->la_errno; p->p_nlminfo->set_getlk_pid = ansp->la_set_getlk_pid; @@ -269,5 +271,6 @@ nfslockdans(p, ansp) (void)wakeup((void *)p->p_nlminfo); + PROC_UNLOCK(p); return (0); }