From: Eric Paris Date: Mon, 17 Aug 2009 01:51:49 +0000 (-0400) Subject: inotify: tail drop inotify q_overflow events X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cd94c8bbef8d4b796a7ed4c551355a334604fd36;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git inotify: tail drop inotify q_overflow events In f44aebcc the tail drop logic of events with no file backing (q_overflow and in_ignored) was reversed so IN_IGNORED events would never be tail dropped. This now means that Q_OVERFLOW events are NOT tail dropped. The fix is to not tail drop IN_IGNORED, but to tail drop Q_OVERFLOW. Signed-off-by: Eric Paris Signed-off-by: Linus Torvalds --- diff --git a/fs/notify/notification.c b/fs/notify/notification.c index 74b3cf30bc6b..3816d5750dd5 100644 --- a/fs/notify/notification.c +++ b/fs/notify/notification.c @@ -153,6 +153,10 @@ static bool event_compare(struct fsnotify_event *old, struct fsnotify_event *new return true; break; case (FSNOTIFY_EVENT_NONE): + if (old->mask & FS_Q_OVERFLOW) + return true; + else if (old->mask & FS_IN_IGNORED) + return false; return false; }; }