[systemd-commits] src/readahead

Michal Schmidt michich at kemper.freedesktop.org
Mon Oct 22 13:09:30 PDT 2012


 src/readahead/readahead-collect.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c4b996bd8748d14d4bb298462a29fbd977fa6fef
Author: Michal Schmidt <mschmidt at redhat.com>
Date:   Mon Oct 22 22:07:31 2012 +0200

    readahead: fix fd validity check
    
    https://bugzilla.redhat.com/show_bug.cgi?id=868603

diff --git a/src/readahead/readahead-collect.c b/src/readahead/readahead-collect.c
index a3f7df5..5d07f47 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);
                 }
         }



More information about the systemd-commits mailing list