Commit 23dad982 authored by Kirill Tkhai's avatar Kirill Tkhai Committed by Andrei Vagin

inotify: Do not DDOS by debug message on restore watch descriptor

Imagine, we have to restore inotify with watch descriptor 0x34d71d6.
Then we have:

1.235021     5578: fsnotify:           Watch got       0x1 but 0x34d71d6 expected
...
...
527.378042   5578: fsnotify:           Watch got 0x34d71d3 but 0x34d71d6 expected
527.378042   5578: fsnotify:           Watch got 0x34d71d4 but 0x34d71d6 expected
527.378042   5578: fsnotify:           Watch got 0x34d71d5 but 0x34d71d6 expected

Stop doing this and stop generating GBs of debug messages.
We already have print message before restore_one_inotify().
Let's add just one more after it.
Signed-off-by: 's avatarKirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 3b338435
......@@ -589,7 +589,6 @@ static int restore_one_inotify(int inotify_fd, struct fsnotify_mark_info *info)
break;
}
pr_debug("\t\tWatch got 0x%x but 0x%x expected\n", wd, iwe->wd);
inotify_rm_watch(inotify_fd, wd);
}
......@@ -689,6 +688,7 @@ static int open_inotify_fd(struct file_desc *d, int *new_fd)
close_safe(&tmp);
break;
}
pr_info("\t 0x%x wd for %#08x is restored\n", wd_info->iwe->wd, wd_info->iwe->id);
}
if (restore_fown(tmp, info->ife->fown))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment