1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-08-02 04:22:02 +03:00

reset_locking()

This commit is contained in:
Alasdair Kergon
2003-05-06 12:03:13 +00:00
parent 2fc3a4576f
commit 8b99c8b6ec
5 changed files with 36 additions and 7 deletions

View File

@ -86,6 +86,19 @@ static void _unblock_signals(void)
return;
}
void reset_locking(void)
{
int was_locked = _lock_count;
_lock_count = 0;
_write_lock_held = 0;
_locking.reset_locking();
if (was_locked)
_unblock_signals();
}
static inline void _update_lock_count(int flags)
{
if ((flags & LCK_TYPE_MASK) == LCK_UNLOCK)