Prevent EINVAL when the lock timeout is -1.