This is the 11185th most frequent Russian word.
грибам
"Dative plural form of 'гриб,' meaning 'to mushrooms.'"
The word 'грибам' is used in its dative form to indicate that attention is being given to the mushrooms.
Я собираю грибы в лесу и всегда уделяю внимание грибам.
I pick mushrooms in the forest and always pay attention to the mushrooms.
Here, 'грибам' is used figuratively in a dative-like sense to describe the source of the smell, although it's not a standard usage and could rather be genitive case 'грибов' for correctness.
Кухня пахнет грибам, потому что я готовлю суп с грибами.
The kitchen smells of mushrooms because I am cooking mushroom soup.
The word 'грибам' is used in its dative plural form to denote the intended recipients of the dedication, which in this case are the mushrooms.