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 <mfasheh@versity.com>
This commit is contained in:
Mark Fasheh
2017-09-08 13:29:56 -07:00
committed by Zach Brown
parent 2d6d113e03
commit f276771d8c
+2 -1
View File
@@ -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;
}