tdb2: get rid of zones
[ccan] / ccan / tdb2 / lock.c
index 10d1e18a512b6d0f0964e8eda80fb33b5914dd54..5d13a23aaec89f17e731ffc71415fb43ceb7bafb 100644 (file)
@@ -257,7 +257,7 @@ static int tdb_nest_lock(struct tdb_context *tdb, tdb_off_t offset, int ltype,
 {
        struct tdb_lock_type *new_lck;
 
-       if (offset >= TDB_HASH_LOCK_START + TDB_HASH_LOCK_RANGE + tdb->map_size / 8) {
+       if (offset > TDB_HASH_LOCK_START + TDB_HASH_LOCK_RANGE + tdb->map_size / 8) {
                tdb->ecode = TDB_ERR_LOCK;
                tdb->log(tdb, TDB_DEBUG_FATAL, tdb->log_priv,
                         "tdb_nest_lock: invalid offset %llu ltype=%d\n",