[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210615235556.970928-2-krisman@collabora.com>
Date: Tue, 15 Jun 2021 19:55:43 -0400
From: Gabriel Krisman Bertazi <krisman@...labora.com>
To: amir73il@...il.com
Cc: kernel@...labora.com, djwong@...nel.org, tytso@....edu,
david@...morbit.com, jack@...e.com, dhowells@...hat.com,
khazhy@...gle.com, linux-fsdevel@...r.kernel.org,
linux-ext4@...r.kernel.org,
Gabriel Krisman Bertazi <krisman@...labora.com>
Subject: [PATCH v2 01/14] fsnotify: Don't call insert hook for overflow events
Overflow events are not mergeable, so they are not hashed_events. But,
when failing inside fsnotify_add_event, for lack of space,
fsnotify_add_event() still calls the insert hook, which adds the
overflow event to the merge list.
Avoid calling the insert hook when adding an overflow event.
Fixes: 94e00d28a680 ("fsnotify: use hash table for faster events merge")
Signed-off-by: Gabriel Krisman Bertazi <krisman@...labora.com>
---
fs/notify/notification.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/fs/notify/notification.c b/fs/notify/notification.c
index 32f45543b9c6..033294669e07 100644
--- a/fs/notify/notification.c
+++ b/fs/notify/notification.c
@@ -106,6 +106,11 @@ int fsnotify_add_event(struct fsnotify_group *group,
return ret;
}
event = group->overflow_event;
+ /*
+ * Since overflow events are not mergeable, don't insert
+ * them in the merge hash.
+ */
+ insert = NULL;
goto queue;
}
--
2.31.0
Powered by blists - more mailing lists