a stop gap fix for a race between dnode_hold and dnode_sync_free
The race was introduced in r337669, the large dnode feature import from
ZoL. The problem was debugged by ZoL developers and then,
independently, on FreeBSD.
The fix is an early proposal by Brian Behlendorf:
This fix never went into ZoL. A larger change that was committed later
included a different solution because of the re-worked code.
Ideally, we want to revert this fix and re-synchronize FreeBSD large
dnode code with that in illumos (or newer ZoL). illumos has a later
import of the feature from ZoL that does not have the bug.
Obtained from: Brian Behlendorf <email@example.com>
Submitted by: firstname.lastname@example.org (patch adaptation)
Reported by: email@example.com
Tested by: firstname.lastname@example.org,
Dennis Noordsij <email@example.com>, Julien Cigar <firstname.lastname@example.org>
MFC after: 10 days