summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-04-17 15:46:37 +0200
committerAnthony G. Basile <blueness@gentoo.org>2015-05-03 14:44:02 -0400
commit2a6e0ea1b61b364c7ae40fd0bce97b1b888652d4 (patch)
tree0ed4bcf51f5c05a931178b9110a2abc96d816967 /src
parent1f84e42e19ac9d0b4e84983317207d0b8718d1d1 (diff)
udev: event - update tags before writing out db
The old tags are read from the db when deciding which tags to clear, make sure we don't write out the new db before the old one has been read. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src')
-rw-r--r--src/udev/udev-event.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
index d4971cd18e..8db287b141 100644
--- a/src/udev/udev-event.c
+++ b/src/udev/udev-event.c
@@ -894,12 +894,11 @@ void udev_event_execute_rules(struct udev_event *event,
udev_device_ensure_usec_initialized(event->dev, event->dev_db);
/* (re)write database file */
- udev_device_update_db(dev);
udev_device_tag_index(dev, event->dev_db, true);
+ udev_device_update_db(dev);
udev_device_set_is_initialized(dev);
- udev_device_unref(event->dev_db);
- event->dev_db = NULL;
+ event->dev_db = udev_device_unref(event->dev_db);
}
}