From: Lennart Poettering Date: Sat, 25 Sep 2010 12:35:53 +0000 (+0200) Subject: readahead: never readahead temporary files since their names tend not to be stable X-Git-Tag: v11~84 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=437dca8b2f05a83e5c1df41226992c8d68b80007;p=systemd readahead: never readahead temporary files since their names tend not to be stable --- diff --git a/src/readahead-collect.c b/src/readahead-collect.c index 47095b1f..c8490b5d 100644 --- a/src/readahead-collect.c +++ b/src/readahead-collect.c @@ -324,8 +324,10 @@ static int collect(const char *root) { if ((k = readlink_malloc(fn, &p)) >= 0) { - if (hashmap_get(files, p)) - /* Already read */ + if (startswith(p, "/tmp") || + hashmap_get(files, p)) + /* Not interesting, or + * already read */ free(p); else { unsigned long ul;