udisksd stuck at 100% CPU

I have had the problem for a few weeks where when I connect any kind of USB drive, or insert a CD/DVD, that udisksd gets stuck at 100% CPU load (on all four cores!) for several minutes.

Various articles on the Internet have suggested solutions involving killing udisksd but this does not work - all that happens is udisksd gets spawned again.

Today, I finally stumbled across an Ubuntu bug report (thank you Pete Ludwig!) which identifies the actual problem.

If you leave lots of dolphin windows open (as I usually do) and one of them refers to a disk which has been moved, dolphin remembers something which then causes the udisksd problem. Close all dolphin windows and the problem will go away.