Revert "fanotify: limit number of event merge attempts"
Temporarily revert commit ad3ea16746 ("fanotify: limit number of
event merge attempts") to enable subsequent upstream commits to
apply and build cleanly.
Stable-dep-of: 8988f11abb82 ("fanotify: reduce event objectid to 29-bit hash")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
62b7f38473
commit
4f14948942
@@ -129,15 +129,11 @@ static bool fanotify_should_merge(struct fsnotify_event *old_fsn,
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Limit event merges to limit CPU overhead per event */
|
||||
#define FANOTIFY_MAX_MERGE_EVENTS 128
|
||||
|
||||
/* and the list better be locked by something too! */
|
||||
static int fanotify_merge(struct list_head *list, struct fsnotify_event *event)
|
||||
{
|
||||
struct fsnotify_event *test_event;
|
||||
struct fanotify_event *new;
|
||||
int i = 0;
|
||||
|
||||
pr_debug("%s: list=%p event=%p\n", __func__, list, event);
|
||||
new = FANOTIFY_E(event);
|
||||
@@ -151,8 +147,6 @@ static int fanotify_merge(struct list_head *list, struct fsnotify_event *event)
|
||||
return 0;
|
||||
|
||||
list_for_each_entry_reverse(test_event, list, list) {
|
||||
if (++i > FANOTIFY_MAX_MERGE_EVENTS)
|
||||
break;
|
||||
if (fanotify_should_merge(test_event, event)) {
|
||||
FANOTIFY_E(test_event)->mask |= new->mask;
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user