mirror of
https://github.com/systemd/systemd
synced 2024-10-04 23:31:09 +00:00
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.
This commit is contained in:
parent
b6107f010a
commit
da14313418
|
@ -1178,16 +1178,9 @@ static int on_inotify(sd_event_source *s, int fd, uint32_t revents, void *userda
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
log_device_debug(dev, "Inotify event: %x for %s", e->mask, devnode);
|
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);
|
synthesize_change(dev);
|
||||||
|
else if (e->mask & IN_IGNORED)
|
||||||
/* 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)
|
|
||||||
udev_watch_end(dev);
|
udev_watch_end(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue