+ * table changes, and for /run/mount events which we watch
+ * for mount options. */
+
+ if (fd == m->utab_inotify_fd) {
+ bool rescan = false;
+
+ /* FIXME: We *really* need to replace this with
+ * libmount's own API for this, we should not hardcode
+ * internal behaviour of libmount here. */
+
+ for (;;) {
+ uint8_t buffer[INOTIFY_EVENT_MAX] _alignas_(struct inotify_event);
+ struct inotify_event *e;
+ ssize_t l;
+
+ l = read(fd, buffer, sizeof(buffer));
+ if (l < 0) {
+ if (errno == EAGAIN || errno == EINTR)
+ break;
+
+ log_error_errno(errno, "Failed to read utab inotify: %m");
+ break;
+ }
+
+ FOREACH_INOTIFY_EVENT(e, buffer, l) {
+ /* Only care about changes to utab,
+ * but we have to monitor the
+ * directory to reliably get
+ * notifications about when utab is
+ * replaced using rename(2) */
+ if ((e->mask & IN_Q_OVERFLOW) || streq(e->name, "utab"))
+ rescan = true;
+ }
+ }
+
+ if (!rescan)
+ return 0;
+ }