summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2012-10-22 22:07:31 +0200
committerMichal Schmidt <mschmidt@redhat.com>2012-10-22 22:08:06 +0200
commitc4b996bd8748d14d4bb298462a29fbd977fa6fef (patch)
tree0acce05b683032e542651d0fb2a24b4f05cf379f /src
parentf1c0ece144f0240154e7355011047ed08e107d8b (diff)
readahead: fix fd validity check
https://bugzilla.redhat.com/show_bug.cgi?id=868603
Diffstat (limited to 'src')
-rw-r--r--src/readahead/readahead-collect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/readahead/readahead-collect.c b/src/readahead/readahead-collect.c
index a3f7df5f6a..5d07f4704a 100644
--- a/src/readahead/readahead-collect.c
+++ b/src/readahead/readahead-collect.c
@@ -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);
}
}