]> git.ozlabs.org Git - ccan/blobdiff - ccan/tdb2/free.c
tdb2: move file operations into separate structure
[ccan] / ccan / tdb2 / free.c
index e853d97eedce65dc8ae4b52313ac5a12ca2ba80d..9ea8efd1134542b1dc0a92a1eb2d0d43364210bc 100644 (file)
@@ -661,7 +661,7 @@ static enum TDB_ERROR tdb_expand(struct tdb_context *tdb, tdb_len_t size)
 
        /* Need to hold a hash lock to expand DB: transactions rely on it. */
        if (!(tdb->flags & TDB_NOLOCK)
-           && !tdb->allrecord_lock.count && !tdb_has_hash_locks(tdb)) {
+           && !tdb->file->allrecord_lock.count && !tdb_has_hash_locks(tdb)) {
                return tdb_logerr(tdb, TDB_ERR_LOCK, TDB_LOG_ERROR,
                                  "tdb_expand: must hold lock during expand");
        }