From: Rusty Russell Date: Tue, 1 Mar 2011 12:49:18 +0000 (+1030) Subject: tdb2: remove zero-length write optimization. X-Git-Url: https://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=78bb1258f9e67f3052488c6168c40f94a3258cca tdb2: remove zero-length write optimization. If benchmarking indicates a problem later, we can restore it. --- diff --git a/ccan/tdb2/io.c b/ccan/tdb2/io.c index a9016c4f..866ff085 100644 --- a/ccan/tdb2/io.c +++ b/ccan/tdb2/io.c @@ -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;