1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 03:27:58 +03:00
lvm2/lib/locking
Milan Broz 6b8304ab43 Fix memory lock imbalance in locking code.
(This affects only cluster locking because only cluster
locking module set LCK_PRE_MEMLOCK.)

With currect code you get
# vgchange -a n
  Internal error: _memlock_count has dropped below 0.
when using cluster locking.

It is caused by _unlock_memory calls here

  if ((flags & (LCK_SCOPE_MASK | LCK_TYPE_MASK)) == LCK_LV_RESUME)
     memlock_dec();

Unfortunately it is also (wrongly) called in immediate unlock
(when LCK_HOLD is not set) from lock_vol
(LCK_UNLOCK is misinterpreted as LCK_LV_RESUME).

Avoid this by comparing original flags and provide memlock
code type of operation (suspend/resume).
2009-11-23 10:55:14 +00:00
..
.exported_symbols Pre-release cleanups. 2009-05-21 03:04:52 +00:00
cluster_locking.c Re-instate partial activation support in clustered mode. (mornfall) 2009-06-12 08:30:19 +00:00
external_locking.c Pre-release cleanups. 2009-05-21 03:04:52 +00:00
file_locking.c Implement write lock prioritisation for file locking and make it default. 2009-09-02 14:47:39 +00:00
locking_types.h Fix bad prototype from previous checkin. 2009-07-15 05:57:11 +00:00
locking.c Fix memory lock imbalance in locking code. 2009-11-23 10:55:14 +00:00
locking.h Add LCK_CONVERT flag I missed on the last checkin. 2009-10-01 14:15:34 +00:00
Makefile.in Allow for a build directory separate from the source. 2009-10-02 19:10:31 +00:00
no_locking.c Add lots of missing stack debug messages to tools. 2009-09-14 22:47:49 +00:00