From b1fff0997e7a9a9508e9ffd4824b8834b85fd5f2 Mon Sep 17 00:00:00 2001 From: Mark Fasheh Date: Fri, 8 Sep 2017 09:22:13 -0500 Subject: [PATCH] scoutfs: dlmglue should initialize res->l_debug_list We're missing initialization of this field. It should never cause a problem today because we always do a list add immediately afterwards but let's be extra careful here and initialize it just in case. We also add a sanity check in ocfs2_add_lockres_tracking() that the lockres hasn't already been put on the debug list. Signed-off-by: Mark Fasheh --- kmod/src/dlmglue.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kmod/src/dlmglue.c b/kmod/src/dlmglue.c index 334a3e4f..49fc1e56 100644 --- a/kmod/src/dlmglue.c +++ b/kmod/src/dlmglue.c @@ -456,6 +456,7 @@ static void ocfs2_add_lockres_tracking(struct ocfs2_lock_res *res, mlog(0, "Add tracking for lockres %s\n", res->l_name); spin_lock(&ocfs2_dlm_tracking_lock); + BUG_ON(!list_empty(&res->l_debug_list)); list_add(&res->l_debug_list, &dlm_debug->d_lockres_tracking); spin_unlock(&ocfs2_dlm_tracking_lock); } @@ -570,6 +571,7 @@ void ocfs2_lock_res_init_once(struct ocfs2_lock_res *res) INIT_LIST_HEAD(&res->l_blocked_list); INIT_LIST_HEAD(&res->l_mask_waiters); INIT_LIST_HEAD(&res->l_holders); + INIT_LIST_HEAD(&res->l_debug_list); } #if 0