From c4b996bd8748d14d4bb298462a29fbd977fa6fef Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Mon, 22 Oct 2012 22:07:31 +0200 Subject: readahead: fix fd validity check https://bugzilla.redhat.com/show_bug.cgi?id=868603 --- src/readahead/readahead-collect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/readahead') 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); } } -- cgit v1.2.3-54-g00ecf