diff options
| author | Doug Rabson <dfr@FreeBSD.org> | 2008-10-25 14:00:37 +0000 |
|---|---|---|
| committer | Doug Rabson <dfr@FreeBSD.org> | 2008-10-25 14:00:37 +0000 |
| commit | 6e6e9c631fc7f341011b6be24c9dac9bf7fb2d59 (patch) | |
| tree | 8107fb6edc24023053304f5bb2f32851bcf0b945 | |
| parent | c4eb9e57492eb02b64d9a8d051cc5e9e7f776c9a (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 130e0b91ec92..2e1510d2f306 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 |
