Even when we receive an inotify event, there is no relevant event source
exists. In that case, we need to drop the event from the buffer,
otherwise we cannot escape from the loop.
Fixes #38265.
(cherry picked from commit
064b9b2bb3544707171662f548677259c3d6aa7f)
}
}
- /* Something pending now? If so, let's finish, otherwise let's read more. */
+ /* Something pending now? If so, let's finish. */
if (d->n_pending > 0)
return 1;
+
+ /* otherwise, drop the event and let's read more */
+ event_inotify_data_drop(e, d, sz);
}
return 0;