tdb: cleanup: split brlock and brunlock methods.
[samba.git] / lib / tdb / common / traverse.c
index c340dd354b7ad6a239aa8ecc7d4c6d2a13e11b32..d329ef4da4030c095e530b0d7b05b344c2256305 100644 (file)
@@ -229,7 +229,7 @@ int tdb_traverse_read(struct tdb_context *tdb,
        ret = tdb_traverse_internal(tdb, fn, private_data, &tl);
        tdb->traverse_read--;
 
-       tdb_transaction_unlock(tdb);
+       tdb_transaction_unlock(tdb, F_RDLCK);
 
        return ret;
 }
@@ -260,7 +260,7 @@ int tdb_traverse(struct tdb_context *tdb,
        ret = tdb_traverse_internal(tdb, fn, private_data, &tl);
        tdb->traverse_write--;
 
-       tdb_transaction_unlock(tdb);
+       tdb_transaction_unlock(tdb, F_WRLCK);
 
        return ret;
 }