summaryrefslogtreecommitdiff
path: root/src/udev
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-04-23 15:19:13 +0200
committerTom Gundersen <teg@jklm.no>2015-04-23 22:31:25 +0200
commit107f2e2526d476c6cc9b81a690391c111027d641 (patch)
tree7c6b71cc8e761b1083fb0ed42ba68f26a2fe15e5 /src/udev
parent353f605867f9dac1eea4ad8ebaa92a004cbcd9e7 (diff)
udevd: fix REMOVE handling
This reverts b67f944. Lazy loading of device properties does not work for devices that are received over netlink, as these are sealed. Reinstate the unconditional loading of the device db. Reported by: Mantas Mikulėnas <grawity@gmail.com>.
Diffstat (limited to 'src/udev')
-rw-r--r--src/udev/udev-event.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
index 978b21832d..2fa26a40be 100644
--- a/src/udev/udev-event.c
+++ b/src/udev/udev-event.c
@@ -794,6 +794,10 @@ void udev_event_execute_rules(struct udev_event *event,
return;
if (streq(udev_device_get_action(dev), "remove")) {
+ udev_device_read_db(dev);
+ udev_device_tag_index(dev, NULL, false);
+ udev_device_delete_db(dev);
+
if (major(udev_device_get_devnum(dev)) != 0)
udev_watch_end(event->udev, dev);
@@ -804,9 +808,6 @@ void udev_event_execute_rules(struct udev_event *event,
if (major(udev_device_get_devnum(dev)) != 0)
udev_node_remove(dev);
-
- udev_device_delete_db(dev);
- udev_device_tag_index(dev, NULL, false);
} else {
event->dev_db = udev_device_clone_with_db(dev);
if (event->dev_db != NULL) {