From 901e7257d11471573301112c85c3a4d013b61f84 Mon Sep 17 00:00:00 2001 From: Peter Rajnoha Date: Wed, 22 Jun 2011 12:56:02 +0000 Subject: [PATCH] Add check for library fallback in _deactivate_node. This fn calls rm_dev_node directly - an exceptional case. It needs to check the DM_UDEV_DISABLE_LIBRARY_FALLBACK flag directly (it's called in dm_task_run normally where it's checked already). --- libdm/libdm-deptree.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libdm/libdm-deptree.c b/libdm/libdm-deptree.c index 044b7ffe4..e316a4261 100644 --- a/libdm/libdm-deptree.c +++ b/libdm/libdm-deptree.c @@ -984,8 +984,9 @@ static int _deactivate_node(const char *name, uint32_t major, uint32_t minor, r = dm_task_run(dmt); /* FIXME Until kernel returns actual name so dm-ioctl.c can handle it */ - rm_dev_node(name, dmt->cookie_set && - !(udev_flags & DM_UDEV_DISABLE_DM_RULES_FLAG)); + if (!(udev_flags & DM_UDEV_DISABLE_LIBRARY_FALLBACK)) + rm_dev_node(name, dmt->cookie_set && + !(udev_flags & DM_UDEV_DISABLE_DM_RULES_FLAG)); /* FIXME Remove node from tree or mark invalid? */