diff options
| author | Doug Rabson <dfr@FreeBSD.org> | 2008-10-25 14:01:29 +0000 |
|---|---|---|
| committer | Doug Rabson <dfr@FreeBSD.org> | 2008-10-25 14:01:29 +0000 |
| commit | 9e89eef61cc90fc8bc245d98f58fca0943190a9a (patch) | |
| tree | 2c9a676a89f551b050f68e15bacae6a7bd1b229a | |
| parent | b1144a09de5ef6b809711c7b25f7db1b45a9084d (diff) | |
Notes
| -rw-r--r-- | sys/kern/kern_lockf.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/kern_lockf.c b/sys/kern/kern_lockf.c index 059d4984b020..d1417f28978a 100644 --- a/sys/kern/kern_lockf.c +++ b/sys/kern/kern_lockf.c @@ -467,12 +467,15 @@ lf_advlockasync(struct vop_advlockasync_args *ap, struct lockf **statep, /* * Avoid the common case of unlocking when inode has no locks. */ - if ((*statep) == NULL || LIST_EMPTY(&(*statep)->ls_active)) { + VI_LOCK(vp); + if ((*statep) == NULL) { if (ap->a_op != F_SETLK) { fl->l_type = F_UNLCK; + VI_UNLOCK(vp); return (0); } } + VI_UNLOCK(vp); /* * Map our arguments to an existing lock owner or create one |
