projects
/
ccan
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cb399d2
)
tdb: fix lock-tracking test code after gradual lock changes.
author
Rusty Russell
<rusty@rustcorp.com.au>
Mon, 30 Aug 2010 01:11:57 +0000
(10:41 +0930)
committer
Rusty Russell
<rusty@rustcorp.com.au>
Mon, 30 Aug 2010 01:11:57 +0000
(10:41 +0930)
ccan/tdb/test/lock-tracking.c
patch
|
blob
|
history
diff --git
a/ccan/tdb/test/lock-tracking.c
b/ccan/tdb/test/lock-tracking.c
index 8c0c86c948b0151d4438cd6bb9f162721cf6d480..8460c048dfcfb74d929153118293572162a78543 100644
(file)
--- a/
ccan/tdb/test/lock-tracking.c
+++ b/
ccan/tdb/test/lock-tracking.c
@@
-70,6
+70,12
@@
int fcntl_with_lockcheck(int fd, int cmd, ... /* arg */ )
break;
if (fl_end >= i->off && fl_end < i_end)
break;
+
+ /* tdb_allrecord_lock does this, handle adjacent: */
+ if (fl->l_start == i_end && fl->l_type == i->type) {
+ i->len = fl->l_len ? i->len + fl->l_len : 0;
+ goto ok;
+ }
}
if (i) {
/* Special case: upgrade of allrecord lock. */