Commit 24e5ddb1 authored by Rusty Russell's avatar Rusty Russell

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: default avatarRusty Russell <rusty@rustcorp.com.au>
parent afa6d57b
...@@ -367,16 +367,6 @@ static bool readonly_changable(struct tdb_context *tdb, const char *caller) ...@@ -367,16 +367,6 @@ static bool readonly_changable(struct tdb_context *tdb, const char *caller)
caller); caller);
return false; 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; return true;
} }
......
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