From 0ce4e0e759614ec19b140e8f19a67305c01cca78 Mon Sep 17 00:00:00 2001
From: Kent Overstreet <kent.overstreet@linux.dev>
Date: Mon, 26 Jun 2023 23:10:21 -0400
Subject: [PATCH] bcachefs: Add a missing rhashtable_destroy() call

Fixes https://lore.kernel.org/linux-bcachefs/784c3e6a-75bd-e6ca-535a-43b3e1daf643@kernel.dk/T/#mbf7caf005f960018eba23b58795d06c06c947411

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
---
 fs/bcachefs/movinggc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/bcachefs/movinggc.c b/fs/bcachefs/movinggc.c
index 7ef78cccc65c6..5ea512968f4d0 100644
--- a/fs/bcachefs/movinggc.c
+++ b/fs/bcachefs/movinggc.c
@@ -369,6 +369,7 @@ static int bch2_copygc_thread(void *arg)
 	}
 
 	move_buckets_wait(&trans, &ctxt, &move_buckets, true);
+	rhashtable_destroy(&move_buckets.table);
 	bch2_trans_exit(&trans);
 	bch2_moving_ctxt_exit(&ctxt);
 
-- 
2.30.2