summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/tdb2/tdb1_lock.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/tdb2/tdb1_lock.c b/lib/tdb2/tdb1_lock.c
index e59874fb2f..5cc0ad6567 100644
--- a/lib/tdb2/tdb1_lock.c
+++ b/lib/tdb2/tdb1_lock.c
@@ -384,15 +384,15 @@ int tdb1_allrecord_unlock(struct tdb_context *tdb, int ltype)
return 0;
}
+ tdb->file->allrecord_lock.count = 0;
+ tdb->file->allrecord_lock.ltype = 0;
+
if (tdb1_brunlock(tdb, ltype, TDB1_FREELIST_TOP, 0)) {
tdb_logerr(tdb, tdb->last_error, TDB_LOG_ERROR,
"tdb1_unlockall failed (%s)", strerror(errno));
return -1;
}
- tdb->file->allrecord_lock.count = 0;
- tdb->file->allrecord_lock.ltype = 0;
-
return 0;
}