From b99bd08b2f097b9f2344a8ec7f379f5f63f04259 Mon Sep 17 00:00:00 2001 From: jsg Date: Tue, 11 Oct 2022 11:46:58 +0000 Subject: [PATCH] add missing unlock in swapmount() ok tb@ kn@ miod@ --- sys/uvm/uvm_swap.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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)))) -- 2.20.1