]> git.ozlabs.org Git - ccan/blobdiff - ccan/tdb2/io.c
tdb2: clarify locking heirarchy; hashes, freelist, then expand lock.
[ccan] / ccan / tdb2 / io.c
index aa79def1e38cc5b49b500d1b513eb9dc446fbbb7..2bcee8a29a17665edf3a08a6b6264bdb7c446322 100644 (file)
@@ -73,7 +73,9 @@ static int tdb_oob(struct tdb_context *tdb, tdb_off_t len, bool probe)
        int ret;
 
        /* We can't hold pointers during this: we could unmap! */
-       assert(!tdb->direct_access || tdb_has_expansion_lock(tdb));
+       assert(!tdb->direct_access
+              || (tdb->flags & TDB_NOLOCK)
+              || tdb_has_expansion_lock(tdb));
 
        if (len <= tdb->map_size)
                return 0;