mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
dmeventd: correct ret code for fail
As _do_register_device() calls register_device() function that returns 1 success & 0 fail - ret = -ENOMEM for fail case instead of 0.
This commit is contained in:
parent
c7b4359ff4
commit
7e1c08bb6a
@ -1,5 +1,6 @@
|
||||
Version 1.02.110 -
|
||||
======================================
|
||||
Return -ENOMEM when device registration fails instead of 0 (=success).
|
||||
Enforce writethrough mode for cleaner policy.
|
||||
Add support for recognition and deactivation of MD devices to blkdeactivate.
|
||||
Move target status functions out of libdm-deptree.
|
||||
|
@ -1070,8 +1070,10 @@ static int _register_for_event(struct message_data *message_data)
|
||||
if (!(thread = _lookup_thread_status(message_data))) {
|
||||
_unlock_mutex();
|
||||
|
||||
if (!(ret = _do_register_device(thread_new)))
|
||||
goto out;
|
||||
if (!_do_register_device(thread_new)) {
|
||||
ret = -ENOMEM;
|
||||
goto_out;
|
||||
}
|
||||
|
||||
thread = thread_new;
|
||||
thread_new = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user