chiark / gitweb /
readahead: never readahead temporary files since their names tend not to be stable
authorLennart Poettering <lennart@poettering.net>
Sat, 25 Sep 2010 12:35:53 +0000 (14:35 +0200)
committerLennart Poettering <lennart@poettering.net>
Sat, 25 Sep 2010 12:35:53 +0000 (14:35 +0200)
src/readahead-collect.c

index 47095b1..c8490b5 100644 (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;