[PATCH 1/2] Revert "lib/tdb: if we know pwrite and pread are thread/fork safe tdb_reopen_all() should be a noop"

Rusty Russell rusty at rustcorp.com.au
Wed Jul 29 20:21:28 MDT 2009


This reverts commit e17df483fbedb81aededdef5fbb6ae1d034bc2dd.

tdb_reopen_all also restores the active lock, required for TDB_CLEAR_IF_FIRST.
---
 lib/tdb/common/open.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/lib/tdb/common/open.c b/lib/tdb/common/open.c
index e58c8ca..b19e4ce 100644
--- a/lib/tdb/common/open.c
+++ b/lib/tdb/common/open.c
@@ -461,10 +461,6 @@ fail:
 /* reopen all tdb's */
 int tdb_reopen_all(int parent_longlived)
 {
-#if defined(LIBREPLACE_PREAD_NOT_REPLACED) && \
-	defined(LIBREPLACE_PWRITE_NOT_REPLACED)
-	return 0;
-#else
 	struct tdb_context *tdb;
 
 	for (tdb=tdbs; tdb; tdb = tdb->next) {
@@ -487,7 +483,6 @@ int tdb_reopen_all(int parent_longlived)
 		if (tdb_reopen(tdb) != 0)
 			return -1;
 	}
-#endif
 
 	return 0;
 }
-- 
1.6.0.4





More information about the samba-technical mailing list