From: Ben Pfaff Date: Fri, 12 Apr 2013 16:39:50 +0000 (-0700) Subject: lockfile: Remove calls to time_disable_restart()/time_enable_restart(). X-Git-Tag: sliver-openvswitch-1.10.90-3~6^2~160 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=0c53ae66a3091f0aee03224d90872bd656d58c6e;p=sliver-openvswitch.git lockfile: Remove calls to time_disable_restart()/time_enable_restart(). These calls are not necessary because F_SETLK does not block. Signed-off-by: Ben Pfaff Acked-by: Ethan Jackson --- diff --git a/lib/lockfile.c b/lib/lockfile.c index 3708aec0d..c37f332f4 100644 --- a/lib/lockfile.c +++ b/lib/lockfile.c @@ -251,9 +251,7 @@ lockfile_try_lock(const char *name, pid_t *pidp, struct lockfile **lockfilep) l.l_start = 0; l.l_len = 0; - time_disable_restart(); error = fcntl(fd, F_SETLK, &l) == -1 ? errno : 0; - time_enable_restart(); if (!error) { *lockfilep = lockfile_register(name, s.st_dev, s.st_ino, fd);