mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 03:09:34 +03:00
OpenZFS 9688 - aggsum_fini leaks memory
Porting Notes:
- Most of these fixes were applied in the original 37fb3e43
commit when this change was ported for Linux.
Authored by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Serapheim Dimitropoulos <serapheim.dimitro@delphix.com>
Reviewed by: Matt Ahrens <matt@delphix.com>
Reviewed by: Prashanth Sreenivasa <pks@delphix.com>
Reviewed by: Jorgen Lundman <lundman@lundman.net>
Reviewed by: Igor Kozhukhov <igor@dilos.org>
Reviewed by: George Melikov <mail@gmelikov.ru>
Approved by: Robert Mustacchi <rm@joyent.com>
Ported-by: Brian Behlendorf <behlendorf1@llnl.gov>
OpenZFS-issue: https://www.illumos.org/issues/9688
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/29bf2d68be
Closes #8042
This commit is contained in:
parent
9b2266e3d8
commit
ae3d849142
@ -13,7 +13,7 @@
|
||||
* CDDL HEADER END
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 2017 by Delphix. All rights reserved.
|
||||
* Copyright (c) 2017, 2018 by Delphix. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <sys/zfs_context.h>
|
||||
|
@ -7845,8 +7845,13 @@ arc_fini(void)
|
||||
cv_destroy(&arc_reclaim_thread_cv);
|
||||
cv_destroy(&arc_reclaim_waiters_cv);
|
||||
|
||||
arc_state_fini();
|
||||
/*
|
||||
* buf_fini() must proceed arc_state_fini() because buf_fin() may
|
||||
* trigger the release of kmem magazines, which can callback to
|
||||
* arc_space_return() which accesses aggsums freed in act_state_fini().
|
||||
*/
|
||||
buf_fini();
|
||||
arc_state_fini();
|
||||
|
||||
ASSERT0(arc_loaned_bytes);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user