I am horribly allergic to several species of mold and mildew, so your linen closet SCARES ME…
but if it was my closet, I would take a two-pronged approach, since what you’re describing is really two problems. First, there’s mold in there, either dead or alive; probably alive. Second, that mold stinks.
To limit the stink, it would be good to make sure the mold is dead – if it’s actively growing, it will keep getting stinky spores all over your stuff no matter what you do. The closet is either damp now or was damp once – do you know which? If it’s still damp, you want to *both *cut off its moisture supply (like **romansperson **says) *and *dry it out.
To dry it out, you could use a small dehumidifier or renewable silica dessicant, or a small, safe heat source like the light bulb Mama Zappa mentioned. If you don’t mind the look, you could take the closet door off its hinges for a month or so and hang a light curtain (maybe an an old sheet) in its place. Or you could prop the door slightly open. Maybe you could aim a fan at the opening for a few days.
Once it’s dry, then move in for the kill. Few things can kill mold completely dead once it’s established in wood fibers, but you can at least kill it on the surface and stop it from growing again. Plain bleach is the cheapest mold killer, but it stinks and has unfortunate… um, bleaching properties. Here are some other useful products – I’ve used the first two and highly recommend them.
Vital-Oxide Mold & Mildew Remover
All Purpose NAS-12 Cleaning Solution
No More Mildew Protective Coating
M-1 Advanced Mildewcide Paint Additive
As for the stink, it should be reduced by dealing with the mold, but if you can’t or don’t want to become a mass mold murderer, all you can do is cover the stink with a better smell. Cedar is an option if you like it. I like citrus smells like these. Wood scents like sandalwood might sort of work *with *the musty smell instead of work against it, if that makes any sense; many essential oils will sink into wood and last quite a while. Solfy’s suggestion of dryer sheets is great if you like your linens to smell like laundry – those things have a lot of scent in them. I put an unwrapped bar of cheap jasmine soap under the seat of my car as an air freshener, and I bet something like that could work in your closet, too.
Good luck!