Disrupting the olfactory neuron function by mutation or laser ablation in worms and flies extends their life spans. [1,2] Therefore, the smell of food decreases life span in these organisms but only when the animals are calorie restricted. 
Two different underlying mechanisms have been suggested: 
1. Regulation of the “hunger neurons” in the hypothalamus via food odors: [5-7] The agouti-related protein (AgRP) neurons are activated by food deprivation. AgRP neurons are regulated by both nutrients and hormones circulating in the blood and the sensory cues associated with food. The smell of food alone inhibits the AgRP neurons of a hungry mouse, affecting food intake and energy metabolism.
2. Direct regulation of energy homeostasis: The olfactory system may have direct effects on energy homeostasis (and therefore, longevity) independent of its function in odor detection. Olfactory structures express a high density of receptors for hormones such as insulin, leptin, and ghrelin.  Evolutionarily, the olfactory system may have a dual role of detecting outside sensory cues and also internal nutrients.
Although the exact mechanism/s is/are not clear and studies in humans are lacking, these results suggest that olfaction and longevity are connected via energy metabolism.
1. Libert S, Zwiener J, Chu X, VanVoorhies W, Roman G, Pletcher SD. Regulation of Drosophila Life Span by Olfaction and Food-Derived Odors. Science (80- ) [Internet]. 2007 Feb 23;315(5815):1133–7. Available from: https://www.sciencemag.org/lookup/doi/10.1126/science.1136610
2. Alcedo J, Kenyon C. Regulation of C. elegans Longevity by Specific Gustatory and Olfactory Neurons. Neuron [Internet]. 2004 Jan;41(1):45–55. Available from: https://linkinghub.elsevier.com/retrieve/pii/S089662730300816X
3. Smith ED, Kaeberlein TL, Lydum BT, Sager J, Welton KL, Kennedy BK, et al. Age- and calorie-independent life span extension from dietary restriction by bacterial deprivation in Caenorhabditis elegans. BMC Dev Biol [Internet]. 2008 Dec 5;8(1):49. Available from: https://bmcdevbiol.biomedcentral.com/articles/10.1186/1471-213X-8-49
4. Garrison JL, Knight ZA. Linking smell to metabolism and aging. Science (80- ) [Internet]. 2017 Nov 10;358(6364):718–9. Available from: https://www.sciencemag.org/lookup/doi/10.1126/science.aao5474
5. Mandelblat-Cerf Y, Ramesh RN, Burgess CR, Patella P, Yang Z, Lowell BB, et al. Arcuate hypothalamic AgRP and putative POMC neurons show opposite changes in spiking across multiple timescales. Elife [Internet]. 2015 Jul 10;4. Available from: https://elifesciences.org/articles/07122
6. Betley JN, Xu S, Cao ZFH, Gong R, Magnus CJ, Yu Y, et al. Neurons for hunger and thirst transmit a negative-valence teaching signal. Nature [Internet]. 2015 May 27;521(7551):180–5. Available from: http://www.nature.com/articles/nature14416
7. Chen Y, Lin Y-C, Kuo T-W, Knight ZA. Sensory Detection of Food Rapidly Modulates Arcuate Feeding Circuits. Cell [Internet]. 2015 Feb;160(5):829–41. Available from: https://linkinghub.elsevier.com/retrieve/pii/S0092867415000768
8. Julliard A-K, Al Koborssy D, Fadool DA, Palouzier-Paulignan B. Nutrient Sensing: Another Chemosensitivity of the Olfactory System. Front Physiol [Internet]. 2017 Jul 12;8. Available from: http://journal.frontiersin.org/article/10.3389/fphys.2017.00468/full