+ * table changes, and for /run/mount events which we watch
+ * for mount options. */
+
+ if (fd == m->utab_inotify_fd) {
+ char inotify_buffer[sizeof(struct inotify_event) + NAME_MAX + 1];
+ struct inotify_event *event;
+ char *p;
+ int rescan = 0;
+
+ while ((r = read(fd, inotify_buffer, sizeof(inotify_buffer))) > 0)
+ for (p = inotify_buffer; p < inotify_buffer + r; ) {
+ event = (struct inotify_event *) p;
+ /* 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 ((event->mask & IN_Q_OVERFLOW) || streq(event->name, "utab"))
+ rescan = 1;
+ p += sizeof(struct inotify_event) + event->len;
+ }
+
+ if (!rescan)
+ return 0;
+ }