diff options
author | Julian Heuking <[email protected]> | 2018-11-30 11:20:44 +0900 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-03-20 15:06:55 -0700 |
commit | 304d469dcdcb47a6c4e993a62007a8b7c81a212a (patch) | |
tree | 61c24cc4bf5c0a946ca87358b73e40d739cc3e04 /module | |
parent | 73c25a78e6b420ff37d703d2e1911c17cf449caa (diff) |
Add missing dmu_zfetch_fini() in dnode_move_impl()
As it turns out, on the Windows platform when rw_init() is called
(rather its bedrock call ExInitializeResourceLite) it is placed on
an active-list of locks, and is removed at rw_destroy() time.
dnode_move() has logic to copy over the old-dnode to new-dnode,
including calling dmu_zfetch_init(new-dnode). But due to the missing
dmu_zfetch_fini(old-dnode), kmem will call dnode_dest() to release the
memory (and in debug builds fill pattern 0xdeadbeef) over the Windows
active-lock's prev/next list pointers, making Windows sad.
But on other platforms, the contents of dmu_zfetch_fini() is one
call to list_destroy() and one to rw_destroy(), which is effectively
a no-op call and is not required. This commit is mostly for
"correctness" and can be skipped there.
Porting Notes:
* This leak exists on Linux but currently can never happen because
the dnode_move() functionality is not supported.
openzfsonosx-commit: openzfsonosx/zfs@d95fe517
Authored by: Julian Heuking <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Matt Ahrens <[email protected]>
Signed-off-by: Jorgen Lundman <[email protected]>
Closes #8519
Diffstat (limited to 'module')
-rw-r--r-- | module/zfs/dnode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/dnode.c b/module/zfs/dnode.c index 35aefa7cb..2903bc78d 100644 --- a/module/zfs/dnode.c +++ b/module/zfs/dnode.c @@ -840,7 +840,7 @@ dnode_move_impl(dnode_t *odn, dnode_t *ndn) offsetof(dmu_buf_impl_t, db_link)); odn->dn_dbufs_count = 0; odn->dn_bonus = NULL; - odn->dn_zfetch.zf_dnode = NULL; + dmu_zfetch_fini(&odn->dn_zfetch); /* * Set the low bit of the objset pointer to ensure that dnode_move() |