From 1e52a9c18720a7b3e9c0c53ca2ac228a9d3d1508 Mon Sep 17 00:00:00 2001 From: Craig Silverstein Date: Thu, 21 Aug 2008 00:30:13 +0000 Subject: [PATCH] 2008-08-20 Craig Silverstein * fileread.cc (File_read::open): Do not lock the file unless it was successfully opened. --- gold/ChangeLog | 5 +++++ gold/fileread.cc | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gold/ChangeLog b/gold/ChangeLog index 21867d21979..4c146581eba 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,8 @@ +2008-08-20 Craig Silverstein + + * fileread.cc (File_read::open): Do not lock the file unless it + was successfully opened. + 2008-08-14 Cary Coutant * x86_64.cc (Target_x86_64::Relocate::relocat_tls): diff --git a/gold/fileread.cc b/gold/fileread.cc index e476194f049..8c2f8f34cf3 100644 --- a/gold/fileread.cc +++ b/gold/fileread.cc @@ -121,9 +121,9 @@ File_read::open(const Task* task, const std::string& name) this->size_ = s.st_size; gold_debug(DEBUG_FILES, "Attempt to open %s succeeded", this->name_.c_str()); - } - this->token_.add_writer(task); + this->token_.add_writer(task); + } return this->descriptor_ >= 0; } -- 2.30.2