Commit 78bb1258 authored by Rusty Russell's avatar Rusty Russell

tdb2: remove zero-length write optimization.

If benchmarking indicates a problem later, we can restore it.
parent b2100462
......@@ -236,11 +236,6 @@ static enum TDB_ERROR tdb_write(struct tdb_context *tdb, tdb_off_t off,
"Write to read-only database");
}
/* FIXME: Bogus optimization? */
if (len == 0) {
return TDB_SUCCESS;
}
ecode = tdb->methods->oob(tdb, off + len, 0);
if (ecode != TDB_SUCCESS) {
return ecode;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment