readahead: fix fd validity check

https://bugzilla.redhat.com/show_bug.cgi?id=868603
This commit is contained in:
Michal Schmidt
2012-10-22 22:07:31 +02:00
parent f1c0ece144
commit c4b996bd87
+1 -1
View File
@@ -460,7 +460,7 @@ static int collect(const char *root) {
log_warning("readlink(%s) failed: %s", fn, strerror(-k));
next_iteration:
if (m->fd)
if (m->fd >= 0)
close_nointr_nofail(m->fd);
}
}