From f276771d8cb285988356e1077f1107f7c5fd9a45 Mon Sep 17 00:00:00 2001 From: Mark Fasheh Date: Thu, 7 Sep 2017 17:12:04 -0500 Subject: [PATCH] scoutfs: we need to uninitialize the dlmglue lockres The dlmglue lockres gets put on a debugging list at initialization time, and taken off the list at uninit time. We were missing the uninit portion of this cycle, causing some list debugging warnings. Call ocfs2_lock_res_free() in free_scoutfs_lock(). In addition, we had a raw kfree() of a scoutfs lock in find_alloc_scoutfs_lock() which also needed to be replaced. Signed-off-by: Mark Fasheh --- kmod/src/lock.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kmod/src/lock.c b/kmod/src/lock.c index b560d3b3..8013c8d1 100644 --- a/kmod/src/lock.c +++ b/kmod/src/lock.c @@ -107,6 +107,7 @@ static void free_scoutfs_lock(struct scoutfs_lock *lock) if (lock) { linfo = SCOUTFS_SB(lock->sb)->lock_info; + ocfs2_lock_res_free(&lock->lockres); scoutfs_key_free(lock->sb, lock->start); scoutfs_key_free(lock->sb, lock->end); kfree(lock); @@ -310,7 +311,7 @@ search: found->users++; spin_unlock(&linfo->lock); - kfree(new); + free_scoutfs_lock(new); return found; }