From: dlg Date: Thu, 17 Oct 2024 22:44:17 +0000 (+0000) Subject: use rw_status instead of interpreting RWL_OWNER to see if a lock is busy. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=52bbc3a3be2032369f1066e20537be6eb39cb4c8;p=openbsd use rw_status instead of interpreting RWL_OWNER to see if a lock is busy. ok claudio@ --- 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); } /*