On walls and ceilings if you have had damp coming through if you just paint over that damp it will keep coming through. This doesn’t mean that there is still damp, but it needs to be treated. The best product to use is Zinsser Bin30 which is available in all specialist decorator’s shops as well as B&Q the last time I was there. Use an old disposable brush as it is very hard to clean off brushes and apply 2 coats of Zinsser. it only takes an hour to dry in between coats. Decorate as normal afterwards.