Browse Source

tdb2: allow readonly changes even while holding locks.

This happens in SAMBA with the TDB_VERSION1, presumably due to a
read-only traverse nested inside a normal traverse (since it doesn't
occur without TDB_VERSION1).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Rusty Russell 14 years ago
parent
commit
24e5ddb143
1 changed files with 0 additions and 10 deletions
  1. 0 10
      ccan/tdb2/tdb.c

+ 0 - 10
ccan/tdb2/tdb.c

@@ -367,16 +367,6 @@ static bool readonly_changable(struct tdb_context *tdb, const char *caller)
 					     caller);
 		return false;
 	}
-
-	if (tdb->file->allrecord_lock.count != 0
-	    || tdb->file->num_lockrecs != 0) {
-		tdb->last_error = tdb_logerr(tdb, TDB_ERR_EINVAL,
-					     TDB_LOG_USE_ERROR,
-					     "%s: can't change"
-					     " TDB_RDONLY holding locks",
-					     caller);
-		return false;
-	}
 	return true;
 }