X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftdb%2Ftest%2Flock-tracking.c;h=8460c048dfcfb74d929153118293572162a78543;hp=8c0c86c948b0151d4438cd6bb9f162721cf6d480;hb=64eca8b85ef0bd13d72381b6c70110e4c342339b;hpb=cb399d268c839dd75a59678268f3ba666147cc20 diff --git a/ccan/tdb/test/lock-tracking.c b/ccan/tdb/test/lock-tracking.c index 8c0c86c9..8460c048 100644 --- 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. */