+ /* Sanity check */
+ if (tdb->transaction && offset >= lock_offset(-1) && len != 0) {
+ tdb->ecode = TDB_ERR_RDONLY;
+ TDB_LOG((tdb, TDB_DEBUG_TRACE, "tdb_brlock attempted in transaction at offset %d rw_type=%d flags=%d len=%d\n",
+ offset, rw_type, flags, (int)len));
+ return -1;
+ }
+