1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

thin: fix pool_has_message return for NULL params

When pool_has_message() is queried with NULL lv and 0 device_id
it should just return 'true' when there is any message queued.
So it needs to return negative value dm_list_empty().

Since there is no user for this code path in code currently,
this bug has not been triggered.
This commit is contained in:
Zdenek Kabelac 2014-03-11 22:50:23 +01:00
parent 7574b3bc80
commit 1850a6e454
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.106 -
====================================
Fix return value in pool_has_message() when quering for any message.
Cleanup all client resources on clvmd exit.
Use dm_zalloc to clear members of clvmd client struct.
Use BLKID_CFLAGS when compiling with blkid support.

View File

@ -160,7 +160,7 @@ int pool_has_message(const struct lv_segment *seg,
}
if (!lv && !device_id)
return dm_list_empty(&seg->thin_messages);
return !dm_list_empty(&seg->thin_messages);
dm_list_iterate_items(tmsg, &seg->thin_messages) {
switch (tmsg->type) {