diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-11-06 17:46:00 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-11-06 23:53:55 +0900 |
commit | da14313418f1bbbdf52bd9435e6a183b1f59779a (patch) | |
tree | a22aa7351a09c57561f70a416e64dd269b167608 | |
parent | b6107f010a1568715a4d4dbb634e01518bd8a336 (diff) | |
download | systemd-da14313418f1bbbdf52bd9435e6a183b1f59779a.tar.gz systemd-da14313418f1bbbdf52bd9435e6a183b1f59779a.tar.bz2 systemd-da14313418f1bbbdf52bd9435e6a183b1f59779a.zip |
udevd: drop redundant logic of receiving uevent
If there exists pending uevents, then sd-event invokes uevent handler.
So, it is not necessary to receive the next uevent in inotify event.
-rw-r--r-- | src/udev/udevd.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c index 9ab10d9d6f..728b45343d 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -1178,16 +1178,9 @@ static int on_inotify(sd_event_source *s, int fd, uint32_t revents, void *userda continue; log_device_debug(dev, "Inotify event: %x for %s", e->mask, devnode); - if (e->mask & IN_CLOSE_WRITE) { + if (e->mask & IN_CLOSE_WRITE) synthesize_change(dev); - - /* settle might be waiting on us to determine the queue - * state. If we just handled an inotify event, we might have - * generated a "change" event, but we won't have queued up - * the resultant uevent yet. Do that. - */ - on_uevent(NULL, -1, 0, manager); - } else if (e->mask & IN_IGNORED) + else if (e->mask & IN_IGNORED) udev_watch_end(dev); } |