readahead: never readahead temporary files since their names tend not to be stable

This commit is contained in:
Lennart Poettering 2010-09-25 14:35:53 +02:00
parent 75a010e0b7
commit 437dca8b2f

View File

@ -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;