diff options
author | Justin T. Gibbs <[email protected]> | 2015-03-12 11:10:35 +1100 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2015-03-12 15:40:39 -0700 |
commit | 4c7b7eedcde7fababf457ca04445e6d9d1617e29 (patch) | |
tree | 4aad4ad89dc24211d74bcc64b285b98b6b03ff31 /module/zfs/dnode_sync.c | |
parent | 73ad4a9f3cfc2e830de45c2a8be2823d01ab07a6 (diff) |
Illumos 5630 - stale bonus buffer in recycled dnode_t leads to data corruption
5630 stale bonus buffer in recycled dnode_t leads to data corruption
Author: Justin T. Gibbs <[email protected]>
Reviewed by: Matthew Ahrens <[email protected]>
Reviewed by: George Wilson <[email protected]>
Reviewed by: Will Andrews <[email protected]>
Approved by: Robert Mustacchi <[email protected]>
References:
https://www.illumos.org/issues/5630
https://github.com/illumos/illumos-gate/commit/cd485b4
Ported-by: Chris Dunlop <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Signed-off-by: Richard Yao <[email protected]>
Issue #3172
Diffstat (limited to 'module/zfs/dnode_sync.c')
-rw-r--r-- | module/zfs/dnode_sync.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/module/zfs/dnode_sync.c b/module/zfs/dnode_sync.c index 6ad623998..1825e9835 100644 --- a/module/zfs/dnode_sync.c +++ b/module/zfs/dnode_sync.c @@ -454,6 +454,12 @@ dnode_evict_dbufs(dnode_t *dn) if (pass >= 100) dprintf("Required %d passes to evict dbufs\n", pass); + dnode_evict_bonus(dn); +} + +void +dnode_evict_bonus(dnode_t *dn) +{ rw_enter(&dn->dn_struct_rwlock, RW_WRITER); if (dn->dn_bonus && refcount_is_zero(&dn->dn_bonus->db_holds)) { mutex_enter(&dn->dn_bonus->db_mtx); |