summaryrefslogtreecommitdiff
path: root/src/readahead-collect.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-09-23 17:35:16 +0200
committerLennart Poettering <lennart@poettering.net>2010-09-23 17:35:16 +0200
commit6e3eb5ba18172ed965e6b91fd7fc05de6c86f739 (patch)
tree76e7cbce7a863f8240f611d555ebe527faaea499 /src/readahead-collect.c
parent746f89063666be8c4d538271c646585ac4fc4353 (diff)
readahead: put limit on files we read ahead
Diffstat (limited to 'src/readahead-collect.c')
-rw-r--r--src/readahead-collect.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/readahead-collect.c b/src/readahead-collect.c
index 5ff3711068..3699c3db81 100644
--- a/src/readahead-collect.c
+++ b/src/readahead-collect.c
@@ -255,6 +255,9 @@ static int collect(const char *root) {
ssize_t n;
struct fanotify_event_metadata *m;
+ if (hashmap_size(files) > READAHEAD_FILES_MAX)
+ break;
+
if (poll(pollfd, _FD_MAX, -1) < 0) {
if (errno == EINTR)