]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udevd: drop redundant logic of receiving uevent
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 6 Nov 2018 08:46:00 +0000 (17:46 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 6 Nov 2018 14:53:55 +0000 (23:53 +0900)
If there exists pending uevents, then sd-event invokes uevent handler.
So, it is not necessary to receive the next uevent in inotify event.

src/udev/udevd.c

index 9ab10d9d6f9ebaf107b969b245ced2e3f617a4b9..728b45343d9a2a159b864c68c584dfa918cd97e4 100644 (file)
@@ -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);
         }