From 3556ae180ca253e447cbc1f0caf92ef65681e1aa Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Wed, 26 Jun 2002 16:09:30 +0000 Subject: 2002-06-26 Marcus Brinkmann * lock-acquire.c (fshelp_acquire_lock): Also wait for exclusive locks which might have been acquired while we were waiting for shared locks to finish. --- libfshelp/lock-acquire.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libfshelp/lock-acquire.c') diff --git a/libfshelp/lock-acquire.c b/libfshelp/lock-acquire.c index 3d8df550..bad1114d 100644 --- a/libfshelp/lock-acquire.c +++ b/libfshelp/lock-acquire.c @@ -111,8 +111,8 @@ fshelp_acquire_lock (struct lock_box *box, int *user, struct mutex *mut, } else if (flags & LOCK_EX) { - /* Wait for any shared locks to finish. */ - while (box->type == LOCK_SH) + /* Wait for any shared (and exclusive) locks to finish. */ + while (box->type != LOCK_UN) { if (flags & LOCK_NB) return EWOULDBLOCK; -- cgit v1.2.3