aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/backref.c
diff options
context:
space:
mode:
authorJakub Kicinski <[email protected]>2024-10-03 17:05:55 +0000
committerJakub Kicinski <[email protected]>2024-10-10 20:13:33 +0000
commit9c0fc36ec493d20599cf088d21b6bddcdc184242 (patch)
tree79d8fb91469d59cc1dd0a55477778f0a1167de8f /fs/btrfs/backref.c
parentnet/smc: Address spelling errors (diff)
parentMerge tag 'net-6.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/net... (diff)
downloadkernel-9c0fc36ec493d20599cf088d21b6bddcdc184242.tar.gz
kernel-9c0fc36ec493d20599cf088d21b6bddcdc184242.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR (net-6.12-rc3). No conflicts and no adjacent changes. Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'fs/btrfs/backref.c')
-rw-r--r--fs/btrfs/backref.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index e2f478ecd7fd..f8e1d5b2c512 100644
--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -3179,10 +3179,14 @@ void btrfs_backref_release_cache(struct btrfs_backref_cache *cache)
btrfs_backref_cleanup_node(cache, node);
}
- cache->last_trans = 0;
-
- for (i = 0; i < BTRFS_MAX_LEVEL; i++)
- ASSERT(list_empty(&cache->pending[i]));
+ for (i = 0; i < BTRFS_MAX_LEVEL; i++) {
+ while (!list_empty(&cache->pending[i])) {
+ node = list_first_entry(&cache->pending[i],
+ struct btrfs_backref_node,
+ list);
+ btrfs_backref_cleanup_node(cache, node);
+ }
+ }
ASSERT(list_empty(&cache->pending_edge));
ASSERT(list_empty(&cache->useless_node));
ASSERT(list_empty(&cache->changed));