]> err.no Git - systemd/commitdiff
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 47095b1f7c6c1272386bf247b6e0b534d77daa9e..c8490b5d3ce0e2d2cf8c6896792ba4facefea87f 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;