Lines Matching refs:tlock
2645 static int tdb_next_lock(struct tdb_context *tdb, struct tdb_traverse_lock *tlock,
2648 int want_next = (tlock->off != 0);
2651 for (; tlock->hash < tdb->header.hash_size; tlock->hash++) {
2652 if (!tlock->off && tlock->hash != 0) {
2681 tdb->methods->next_hash_chain(tdb, &tlock->hash);
2682 if (tlock->hash == tdb->header.hash_size) {
2687 if (tdb_lock(tdb, tlock->hash, tlock->lock_rw) == -1)
2691 if (!tlock->off) {
2692 if (tdb_ofs_read(tdb, TDB_HASH_TOP(tlock->hash),
2693 &tlock->off) == -1)
2697 if (tdb_unlock_record(tdb, tlock->off) != 0)
2703 if (tdb_rec_read(tdb, tlock->off, rec) == -1)
2705 tlock->off = rec->next;
2709 while( tlock->off) {
2711 if (tdb_rec_read(tdb, tlock->off, rec) == -1)
2715 if (tlock->off == rec->next) {
2722 if (tdb_lock_record(tdb, tlock->off) != 0)
2724 return tlock->off;
2728 current = tlock->off;
2729 tlock->off = rec->next;
2734 tdb_unlock(tdb, tlock->hash, tlock->lock_rw);
2741 tlock->off = 0;
2742 if (tdb_unlock(tdb, tlock->hash, tlock->lock_rw) != 0)