diff options
author | 2019-12-02 15:01:18 +0000 | |
---|---|---|
committer | 2019-12-02 15:01:18 +0000 | |
commit | 5f80893c83c07bdba272df273bcb6252a5c1b2ee (patch) | |
tree | 0cb0bc48ed8cc5099e559af957714a2713855c49 | |
parent | Use a unified cache in all libunbound based resolvers. (diff) | |
download | wireguard-openbsd-5f80893c83c07bdba272df273bcb6252a5c1b2ee.tar.xz wireguard-openbsd-5f80893c83c07bdba272df273bcb6252a5c1b2ee.zip |
Remove now unneeded kernel locking from vfs_lockf.c.
OK mpi@ anton@
-rw-r--r-- | sys/kern/vfs_lockf.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/sys/kern/vfs_lockf.c b/sys/kern/vfs_lockf.c index 9cf18489cf7..3b4b695b9de 100644 --- a/sys/kern/vfs_lockf.c +++ b/sys/kern/vfs_lockf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_lockf.c,v 1.43 2019/05/12 19:43:34 anton Exp $ */ +/* $OpenBSD: vfs_lockf.c,v 1.44 2019/12/02 15:01:18 visa Exp $ */ /* $NetBSD: vfs_lockf.c,v 1.7 1996/02/04 02:18:21 christos Exp $ */ /* @@ -380,9 +380,7 @@ lf_setlock(struct lockf *lock) LFPRINT(("lf_setlock: blocking on", block), DEBUG_SETLOCK); TAILQ_INSERT_TAIL(&block->lf_blkhd, lock, lf_block); TAILQ_INSERT_TAIL(&lock->lf_state->ls_pending, lock, lf_entry); - KERNEL_LOCK(); error = rwsleep(lock, &lockf_lock, priority, "lockf", 0); - KERNEL_UNLOCK(); TAILQ_REMOVE(&lock->lf_state->ls_pending, lock, lf_entry); wakeup_one(lock->lf_state); if (lock->lf_blk != NULL) { @@ -740,11 +738,8 @@ lf_purgelocks(struct lockf_state **state) LFPRINT(("lf_purgelocks: wakeup", lock), DEBUG_SETLOCK); lf_wakelock(lock, F_INTR); } - while (!TAILQ_EMPTY(&ls->ls_pending)) { - KERNEL_LOCK(); + while (!TAILQ_EMPTY(&ls->ls_pending)) rwsleep(ls, &lockf_lock, PLOCK, "lockfp", 0); - KERNEL_UNLOCK(); - } /* * Any remaining locks cannot block other locks at this point and can |