Walking out of the flight deck is not a solution- you could create an incident or cause something to happen because the other guy will be puffing away and relaxing and probably not concentrating. I have handled this in the past by politely requesting it not happen. By saying the distress so much smoke will cause you is more than the pleasure it will give them, so would they mind awfully not doing it? You do not want your flight deck being stunk out, so be assertive and stop it!