From 0b6bc8789cdf8f412b24f34b46b898824accaa1b Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Thu, 16 May 2019 13:29:08 -0700 Subject: [PATCH] scoutfs: don't leak btree block refs Somewhere in the mists of time (around when we removed path tracking which held refs to blocks?) walking blocks to migrate started leaking btree block references. It was providing a pointer so the walk gave it the block it found but the caller was never dropping that ref. It wasn't doing anything with the result of the walk so we just don't provide a block pointer and the walk will drop the ref for us. This will stop leaking refs, effectively pinning the ring in memory. Signed-off-by: Zach Brown --- kmod/src/btree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kmod/src/btree.c b/kmod/src/btree.c index 7cda3178..c680579b 100644 --- a/kmod/src/btree.c +++ b/kmod/src/btree.c @@ -1646,7 +1646,7 @@ int scoutfs_btree_write_dirty(struct super_block *sb) ret = btree_walk(sb, root, BTW_DIRTY | BTW_NEXT | BTW_MIGRATE, - walk_key, walk_len, 0, &bt, + walk_key, walk_len, 0, NULL, iter_key, &iter_len); if (ret < 0) goto out;