X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftdb2%2Fio.c;h=2bcee8a29a17665edf3a08a6b6264bdb7c446322;hp=aa79def1e38cc5b49b500d1b513eb9dc446fbbb7;hb=a0ac303da08672d4cfe5629b794b2651e1e98399;hpb=0455668028cfe8f0417037975bc3d7dd742974db diff --git a/ccan/tdb2/io.c b/ccan/tdb2/io.c index aa79def1..2bcee8a2 100644 --- a/ccan/tdb2/io.c +++ b/ccan/tdb2/io.c @@ -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;