diff options
author | mav <mav@FreeBSD.org> | 2015-10-03 07:22:24 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2015-10-03 07:22:24 +0000 |
commit | 53fc33bdada52f555b8b55b9e07bfdc004df4c44 (patch) | |
tree | 6fca87e9eda53a67f4d77bdab20d027c5f168d6f /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c | |
parent | 68ec6bda1b9121a640af91331ebf82b0108c4c96 (diff) | |
download | FreeBSD-src-53fc33bdada52f555b8b55b9e07bfdc004df4c44.zip FreeBSD-src-53fc33bdada52f555b8b55b9e07bfdc004df4c44.tar.gz |
MFC r286545:
5630 stale bonus buffer in recycled dnode_t leads to data corruption
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george@delphix.com>
Reviewed by: Will Andrews <will@freebsd.org>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Justin T. Gibbs <justing@spectralogic.com>
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c index 8fb413c..510cb62 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c @@ -441,6 +441,12 @@ dnode_evict_dbufs(dnode_t *dn) ASSERT(pass < 100); /* sanity check */ } while (progress); + 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); |