X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Flockfile.c;h=43ccaf98a21387fa448cfa9fa779994373e79c43;hb=9ac3fce4d5aea7e963439eb97f7c2d157aef4dfc;hp=771ad70c5d48d68c0ff784af315a455f5c28fa21;hpb=d76f09ea77e03ee5a3a7bb67bcab1ac4bb54172b;p=openvswitch diff --git a/lib/lockfile.c b/lib/lockfile.c index 771ad70c..43ccaf98 100644 --- a/lib/lockfile.c +++ b/lib/lockfile.c @@ -1,4 +1,4 @@ - /* Copyright (c) 2008, 2009, 2010 Nicira Networks + /* Copyright (c) 2008, 2009, 2010, 2011 Nicira Networks * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -111,17 +111,12 @@ lockfile_lock(const char *file, int timeout, struct lockfile **lockfilep) } } while (error == EINTR && (timeout == INT_MAX || elapsed < timeout)); - if (!error) { - if (elapsed) { - VLOG_WARN("%s: waited %lld ms for lock file", - lock_name, elapsed); - } - } else if (error == EINTR) { + if (error == EINTR) { COVERAGE_INC(lockfile_timeout); VLOG_WARN("%s: giving up on lock file after %lld ms", lock_name, elapsed); error = ETIMEDOUT; - } else { + } else if (error) { COVERAGE_INC(lockfile_error); if (error == EACCES) { error = EAGAIN;