Moved file locking utilities from index/lockutil.c to util/flock.c