jenkinsci/jenkins — pull request #1399 by recampbell (2014-09-18 18:11:17+00:00)
Title: [JENKINS-24763] Prevent livelocks by skipping old data removal onSave/remove if doDiscard is running.

Previous impl did this check after obtaining the synchronization lock, which is pointless. Also, previous flag was not thread safe.