mirror of
https://github.com/versity/scoutfs.git
synced 2026-09-10 01:56:09 +00:00
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 <zab@versity.com>
This commit is contained in:
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user