From 52bbc3a3be2032369f1066e20537be6eb39cb4c8 Mon Sep 17 00:00:00 2001 From: dlg Date: Thu, 17 Oct 2024 22:44:17 +0000 Subject: [PATCH] use rw_status instead of interpreting RWL_OWNER to see if a lock is busy. ok claudio@ --- sys/kern/vfs_subr.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 201fcac8c7d..922807bcb20 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_subr.c,v 1.322 2024/07/13 14:37:55 beck Exp $ */ +/* $OpenBSD: vfs_subr.c,v 1.323 2024/10/17 22:44:17 dlg Exp $ */ /* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */ /* @@ -246,10 +246,7 @@ vfs_unbusy(struct mount *mp) int vfs_isbusy(struct mount *mp) { - if (RWLOCK_OWNER(&mp->mnt_lock) > 0) - return (1); - else - return (0); + return (rw_status(&mp->mnt_lock) != 0); } /* -- 2.20.1