Lines Matching refs:F_WRLCK

346 	if ((rw_type == F_WRLCK) && (tdb->read_only || tdb->traverse_read)) {  in tdb_brlock()
388 if (tdb_brlock(tdb, offset, F_WRLCK, F_SETLKW, 1, len) == 0) { in tdb_brlock_upgrade()
700 return _tdb_lockall(tdb, F_WRLCK, F_SETLKW); in tdb_lockall()
706 return _tdb_lockall(tdb, F_WRLCK | TDB_MARK_LOCK, F_SETLKW); in tdb_lockall_mark()
712 return _tdb_unlockall(tdb, F_WRLCK | TDB_MARK_LOCK); in tdb_lockall_unmark()
718 return _tdb_lockall(tdb, F_WRLCK, F_SETLK); in tdb_lockall_nonblock()
724 return _tdb_unlockall(tdb, F_WRLCK); in tdb_unlockall()
749 return tdb_lock(tdb, BUCKET(tdb->hash_fn(&key)), F_WRLCK); in tdb_chainlock()
757 return tdb_lock_nonblock(tdb, BUCKET(tdb->hash_fn(&key)), F_WRLCK); in tdb_chainlock_nonblock()
763 return tdb_lock(tdb, BUCKET(tdb->hash_fn(&key)), F_WRLCK | TDB_MARK_LOCK); in tdb_chainlock_mark()
769 return tdb_unlock(tdb, BUCKET(tdb->hash_fn(&key)), F_WRLCK | TDB_MARK_LOCK); in tdb_chainlock_unmark()
774 return tdb_unlock(tdb, BUCKET(tdb->hash_fn(&key)), F_WRLCK); in tdb_chainunlock()
806 return tdb->methods->tdb_brlock(tdb, off, F_WRLCK, F_SETLK, 1, 1); in tdb_write_lock_record()
1062 if (tdb_lock(tdb, -1, F_WRLCK) == -1) { in tdb_expand()
1119 tdb_unlock(tdb, -1, F_WRLCK); in tdb_expand()
1122 tdb_unlock(tdb, -1, F_WRLCK); in tdb_expand()
1633 if (tdb_transaction_lock(tdb, F_WRLCK) == -1) { in tdb_transaction_start()
2036 if (tdb_brlock(tdb, GLOBAL_LOCK, F_WRLCK, F_SETLKW, 0, 1) == -1) { in tdb_transaction_commit()
2332 if (tdb_lock(tdb, -1, F_WRLCK) != 0) in tdb_free()
2416 tdb_unlock(tdb, -1, F_WRLCK); in tdb_free()
2420 tdb_unlock(tdb, -1, F_WRLCK); in tdb_free()
2498 if (tdb_lock(tdb, -1, F_WRLCK) == -1) in tdb_allocate()
2551 tdb_unlock(tdb, -1, F_WRLCK); in tdb_allocate()
2560 tdb_unlock(tdb, -1, F_WRLCK); in tdb_allocate()
2599 if (tdb_lock(tdb, -1, F_WRLCK) == -1) { in tdb_validate_freelist()
2643 tdb_unlock(tdb, -1, F_WRLCK); in tdb_validate_freelist()
2849 struct tdb_traverse_lock tl = { NULL, 0, 0, F_WRLCK }; in tdb_traverse()
2856 if (tdb_transaction_lock(tdb, F_WRLCK)) { in tdb_traverse()
2992 if (tdb_lock(tdb, i, F_WRLCK) != 0) in tdb_dump_chain()
2996 return tdb_unlock(tdb, i, F_WRLCK); in tdb_dump_chain()
3005 return tdb_unlock(tdb, i, F_WRLCK); in tdb_dump_chain()
3025 if ((ret = tdb_lock(tdb, -1, F_WRLCK)) != 0) in tdb_printfreelist()
3032 tdb_unlock(tdb, -1, F_WRLCK); in tdb_printfreelist()
3040 tdb_unlock(tdb, -1, F_WRLCK); in tdb_printfreelist()
3046 tdb_unlock(tdb, -1, F_WRLCK); in tdb_printfreelist()
3060 return tdb_unlock(tdb, -1, F_WRLCK); in tdb_printfreelist()
3095 if (tdb_brlock(tdb, TDB_SEQNUM_OFS, F_WRLCK, F_SETLKW, 1, 1) != 0) { in tdb_increment_seqnum()
3337 if (tdb_lock(tdb, -1, F_WRLCK) == -1) { in tdb_purge_dead()
3362 tdb_unlock(tdb, -1, F_WRLCK); in tdb_purge_dead()
3380 if (tdb_lock(tdb, BUCKET(hash), F_WRLCK) == -1) in tdb_delete_hash()
3392 tdb_unlock(tdb, BUCKET(hash), F_WRLCK); in tdb_delete_hash()
3403 if (!(rec_ptr = tdb_find_lock_hash(tdb, key, hash, F_WRLCK, in tdb_delete_hash()
3414 if (tdb_unlock(tdb, BUCKET(rec.full_hash), F_WRLCK) != 0) in tdb_delete_hash()
3474 if (tdb_lock(tdb, BUCKET(hash), F_WRLCK) == -1) in tdb_store()
3548 if (tdb_lock(tdb, -1, F_WRLCK) == -1) { in tdb_store()
3554 tdb_unlock(tdb, -1, F_WRLCK); in tdb_store()
3561 tdb_unlock(tdb, -1, F_WRLCK); in tdb_store()
3592 tdb_unlock(tdb, BUCKET(hash), F_WRLCK); in tdb_store()
3606 if (tdb_lock(tdb, BUCKET(hash), F_WRLCK) == -1) in tdb_append()
3633 tdb_unlock(tdb, BUCKET(hash), F_WRLCK); in tdb_append()
3883 if (tdb->methods->tdb_brlock(tdb, GLOBAL_LOCK, F_WRLCK, F_SETLKW, 0, 1) == -1) { in tdb_open_ex()
3891 (locked = (tdb->methods->tdb_brlock(tdb, ACTIVE_LOCK, F_WRLCK, F_SETLK, 0, 1) == 0))) { in tdb_open_ex()