diff options
author | Leo Alterman <lalterman@nicira.com> | 2012-08-08 17:40:43 -0700 |
---|---|---|
committer | Leo Alterman <lalterman@nicira.com> | 2012-08-09 15:06:38 -0700 |
commit | 4770e795f51cdff3b43325474997088f540c9b18 (patch) | |
tree | 335cbf05c72087e3aeaa28898d515f50fcde3e46 /ovsdb | |
parent | b6d729adb55c24fdeafecdae8565ba04586b93a0 (diff) |
lockfile: Remove lockfile_lock timeout argument
lockfile_lock() accepts a timeout argument but, aside from unit tests
pertaining to timeout, its value is always 0. Since this feature relies on
a periodic SIGALRM signal, which is not a given if we're not caching time,
the cleanest solution is just to remove it.
Signed-off-by: Leo Alterman <lalterman@nicira.com>
Diffstat (limited to 'ovsdb')
-rw-r--r-- | ovsdb/file.c | 2 | ||||
-rw-r--r-- | ovsdb/log.c | 2 | ||||
-rw-r--r-- | ovsdb/ovsdb-tool.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/ovsdb/file.c b/ovsdb/file.c index 9e2dd507..43fcb956 100644 --- a/ovsdb/file.c +++ b/ovsdb/file.c @@ -649,7 +649,7 @@ ovsdb_file_compact(struct ovsdb_file *file) /* Lock temporary file. */ tmp_name = xasprintf("%s.tmp", file->file_name); - retval = lockfile_lock(tmp_name, 0, &tmp_lock); + retval = lockfile_lock(tmp_name, &tmp_lock); if (retval) { error = ovsdb_io_error(retval, "could not get lock on %s", tmp_name); goto exit; diff --git a/ovsdb/log.c b/ovsdb/log.c index 9b882dc4..b79535ac 100644 --- a/ovsdb/log.c +++ b/ovsdb/log.c @@ -80,7 +80,7 @@ ovsdb_log_open(const char *name, enum ovsdb_log_open_mode open_mode, locking = open_mode != OVSDB_LOG_READ_ONLY; } if (locking) { - int retval = lockfile_lock(name, 0, &lockfile); + int retval = lockfile_lock(name, &lockfile); if (retval) { error = ovsdb_io_error(retval, "%s: failed to lock lockfile", name); diff --git a/ovsdb/ovsdb-tool.c b/ovsdb/ovsdb-tool.c index f31bdd10..6b75f497 100644 --- a/ovsdb/ovsdb-tool.c +++ b/ovsdb/ovsdb-tool.c @@ -229,14 +229,14 @@ compact_or_convert(const char *src_name_, const char *dst_name_, /* Lock the source, if we will be replacing it. */ if (in_place) { - retval = lockfile_lock(src_name, 0, &src_lock); + retval = lockfile_lock(src_name, &src_lock); if (retval) { ovs_fatal(retval, "%s: failed to lock lockfile", src_name); } } /* Get (temporary) destination and lock it. */ - retval = lockfile_lock(dst_name, 0, &dst_lock); + retval = lockfile_lock(dst_name, &dst_lock); if (retval) { ovs_fatal(retval, "%s: failed to lock lockfile", dst_name); } |