Fix a softdep bug exposed by our recent changes to make reboot drop to read-only
The deadlock happens when softdep gets the same buffer in the BMSAFEMAP case
that it already called getdirtybuf() on and made busy at the top of the loop.
when this is the case, skip the BMSAFEMAP case and simply write the buffer
out at the bottom of the loop as always. This avoids calling getdirtybuf()
a second time on the same buffer we already took for exclusive use ourself
and have not yet written out.
While I'm in here add a KASSERT for the similar case above, which I don't
think can happen but we would deadlock in the same way if it does.
testing by and ok bluhm@