Lines Matching refs:F_WRLCK
344 if ((rw_type == F_WRLCK) && (tdb->read_only || tdb->traverse_read)) { in tdb_brlock()
386 if (tdb_brlock(tdb, offset, F_WRLCK, F_SETLKW, 1, len) == 0) { in tdb_brlock_upgrade()
698 return _tdb_lockall(tdb, F_WRLCK, F_SETLKW); in tdb_lockall()
704 return _tdb_lockall(tdb, F_WRLCK | TDB_MARK_LOCK, F_SETLKW); in tdb_lockall_mark()
710 return _tdb_unlockall(tdb, F_WRLCK | TDB_MARK_LOCK); in tdb_lockall_unmark()
716 return _tdb_lockall(tdb, F_WRLCK, F_SETLK); in tdb_lockall_nonblock()
722 return _tdb_unlockall(tdb, F_WRLCK); in tdb_unlockall()
747 return tdb_lock(tdb, BUCKET(tdb->hash_fn(&key)), F_WRLCK); in tdb_chainlock()
755 return tdb_lock_nonblock(tdb, BUCKET(tdb->hash_fn(&key)), F_WRLCK); in tdb_chainlock_nonblock()
761 return tdb_lock(tdb, BUCKET(tdb->hash_fn(&key)), F_WRLCK | TDB_MARK_LOCK); in tdb_chainlock_mark()
767 return tdb_unlock(tdb, BUCKET(tdb->hash_fn(&key)), F_WRLCK | TDB_MARK_LOCK); in tdb_chainlock_unmark()
772 return tdb_unlock(tdb, BUCKET(tdb->hash_fn(&key)), F_WRLCK); in tdb_chainunlock()
804 return tdb->methods->tdb_brlock(tdb, off, F_WRLCK, F_SETLK, 1, 1); in tdb_write_lock_record()
1057 if (tdb_lock(tdb, -1, F_WRLCK) == -1) { in tdb_expand()
1114 tdb_unlock(tdb, -1, F_WRLCK); in tdb_expand()
1117 tdb_unlock(tdb, -1, F_WRLCK); in tdb_expand()
1628 if (tdb_transaction_lock(tdb, F_WRLCK) == -1) { in tdb_transaction_start()
2031 if (tdb_brlock(tdb, GLOBAL_LOCK, F_WRLCK, F_SETLKW, 0, 1) == -1) { in tdb_transaction_commit()
2327 if (tdb_lock(tdb, -1, F_WRLCK) != 0) in tdb_free()
2411 tdb_unlock(tdb, -1, F_WRLCK); in tdb_free()
2415 tdb_unlock(tdb, -1, F_WRLCK); in tdb_free()
2493 if (tdb_lock(tdb, -1, F_WRLCK) == -1) in tdb_allocate()
2546 tdb_unlock(tdb, -1, F_WRLCK); in tdb_allocate()
2555 tdb_unlock(tdb, -1, F_WRLCK); in tdb_allocate()
2594 if (tdb_lock(tdb, -1, F_WRLCK) == -1) { in tdb_validate_freelist()
2638 tdb_unlock(tdb, -1, F_WRLCK); in tdb_validate_freelist()
2844 struct tdb_traverse_lock tl = { NULL, 0, 0, F_WRLCK }; in tdb_traverse()
2851 if (tdb_transaction_lock(tdb, F_WRLCK)) { in tdb_traverse()
2987 if (tdb_lock(tdb, i, F_WRLCK) != 0) in tdb_dump_chain()
2991 return tdb_unlock(tdb, i, F_WRLCK); in tdb_dump_chain()
3000 return tdb_unlock(tdb, i, F_WRLCK); in tdb_dump_chain()
3020 if ((ret = tdb_lock(tdb, -1, F_WRLCK)) != 0) in tdb_printfreelist()
3027 tdb_unlock(tdb, -1, F_WRLCK); in tdb_printfreelist()
3035 tdb_unlock(tdb, -1, F_WRLCK); in tdb_printfreelist()
3041 tdb_unlock(tdb, -1, F_WRLCK); in tdb_printfreelist()
3055 return tdb_unlock(tdb, -1, F_WRLCK); in tdb_printfreelist()
3092 if (tdb_brlock(tdb, TDB_SEQNUM_OFS, F_WRLCK, F_SETLKW, 1, 1) != 0) { in tdb_increment_seqnum()
3334 if (tdb_lock(tdb, -1, F_WRLCK) == -1) { in tdb_purge_dead()
3359 tdb_unlock(tdb, -1, F_WRLCK); in tdb_purge_dead()
3377 if (tdb_lock(tdb, BUCKET(hash), F_WRLCK) == -1) in tdb_delete_hash()
3389 tdb_unlock(tdb, BUCKET(hash), F_WRLCK); in tdb_delete_hash()
3400 if (!(rec_ptr = tdb_find_lock_hash(tdb, key, hash, F_WRLCK, in tdb_delete_hash()
3411 if (tdb_unlock(tdb, BUCKET(rec.full_hash), F_WRLCK) != 0) in tdb_delete_hash()
3471 if (tdb_lock(tdb, BUCKET(hash), F_WRLCK) == -1) in tdb_store()
3545 if (tdb_lock(tdb, -1, F_WRLCK) == -1) { in tdb_store()
3551 tdb_unlock(tdb, -1, F_WRLCK); in tdb_store()
3558 tdb_unlock(tdb, -1, F_WRLCK); in tdb_store()
3589 tdb_unlock(tdb, BUCKET(hash), F_WRLCK); in tdb_store()
3603 if (tdb_lock(tdb, BUCKET(hash), F_WRLCK) == -1) in tdb_append()
3630 tdb_unlock(tdb, BUCKET(hash), F_WRLCK); in tdb_append()
3880 if (tdb->methods->tdb_brlock(tdb, GLOBAL_LOCK, F_WRLCK, F_SETLKW, 0, 1) == -1) { in tdb_open_ex()
3888 (locked = (tdb->methods->tdb_brlock(tdb, ACTIVE_LOCK, F_WRLCK, F_SETLK, 0, 1) == 0))) { in tdb_open_ex()