lockfile: Remove calls to time_disable_restart()/time_enable_restart().
authorBen Pfaff <blp@nicira.com>
Fri, 12 Apr 2013 16:39:50 +0000 (09:39 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 5 Jun 2013 21:57:58 +0000 (14:57 -0700)
These calls are not necessary because F_SETLK does not block.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
lib/lockfile.c

index 3708aec..c37f332 100644 (file)
@@ -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);