diff options
author | Visa Hankala <visa@cvs.openbsd.org> | 2019-12-02 15:01:19 +0000 |
---|---|---|
committer | Visa Hankala <visa@cvs.openbsd.org> | 2019-12-02 15:01:19 +0000 |
commit | 4169ea8abde3cee64d31173a07f3624ef021124c (patch) | |
tree | 23e4005ed24ab867b8b637b7acdc8c14423e9583 /sys/kern/vfs_lockf.c | |
parent | 252c6f554bfd702419760425ad832e8926930f0d (diff) |
Remove now unneeded kernel locking from vfs_lockf.c.
OK mpi@ anton@
Diffstat (limited to 'sys/kern/vfs_lockf.c')
-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 |