From: jsg Date: Tue, 11 Oct 2022 11:46:58 +0000 (+0000) Subject: add missing unlock in swapmount() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b99bd08b2f097b9f2344a8ec7f379f5f63f04259;p=openbsd add missing unlock in swapmount() ok tb@ kn@ miod@ --- diff --git a/sys/uvm/uvm_swap.c b/sys/uvm/uvm_swap.c index f22cd3158b8..38f27cf5164 100644 --- a/sys/uvm/uvm_swap.c +++ b/sys/uvm/uvm_swap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_swap.c,v 1.164 2022/08/29 11:09:31 mpi Exp $ */ +/* $OpenBSD: uvm_swap.c,v 1.165 2022/10/11 11:46:58 jsg Exp $ */ /* $NetBSD: uvm_swap.c,v 1.40 2000/11/17 11:39:39 mrg Exp $ */ /* @@ -1962,8 +1962,10 @@ swapmount(void) goto gotit; } else #endif - if (bdevvp(swap_dev, &vp)) + if (bdevvp(swap_dev, &vp)) { + rw_exit_write(&swap_syscall_lock); return; + } /* Construct a potential path to swap */ if ((nam = findblkname(major(swap_dev))))