[PATCH 2/2] Move ckpt_objhash_free() to before we destroy the deferqueues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This makes the deferqueue cleanup function run after all the objects
have been purged from the hash and thus gives us an opportunity to cleanup
things that *must* happen after the last reference is dropped (such as
unregister_netdev()).

Signed-off-by: Dan Smith <danms@xxxxxxxxxx>
---
 checkpoint/sys.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/checkpoint/sys.c b/checkpoint/sys.c
index f04b8b0..f739932 100644
--- a/checkpoint/sys.c
+++ b/checkpoint/sys.c
@@ -223,6 +223,8 @@ static void ckpt_ctx_free(struct ckpt_ctx *ctx)
 	if (ctx->kflags & CKPT_CTX_RESTART)
 		restore_debug_free(ctx);
 
+	ckpt_obj_hash_free(ctx);
+
 	if (ctx->deferqueue)
 		deferqueue_destroy(ctx->deferqueue);
 
@@ -234,7 +236,6 @@ static void ckpt_ctx_free(struct ckpt_ctx *ctx)
 	if (ctx->logfile)
 		fput(ctx->logfile);
 
-	ckpt_obj_hash_free(ctx);
 	path_put(&ctx->root_fs_path);
 	ckpt_pgarr_free(ctx);
 
-- 
1.6.2.5

_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers

[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux