Skip to content

Commit cf53883

Browse files
author
Jan Schmidt
committed
Btrfs: fix buffer leak in btrfs_next_old_leaf
When calling btrfs_next_old_leaf, we were leaking an extent buffer in the rare case of using the deadlock avoidance code needed for the tree mod log. Signed-off-by: Jan Schmidt <[email protected]>
1 parent b630556 commit cf53883

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/btrfs/ctree.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5127,6 +5127,7 @@ int btrfs_next_old_leaf(struct btrfs_root *root, struct btrfs_path *path,
51275127
* locked. To solve this situation, we give up
51285128
* on our lock and cycle.
51295129
*/
5130+
free_extent_buffer(next);
51305131
btrfs_release_path(path);
51315132
cond_resched();
51325133
goto again;

0 commit comments

Comments
 (0)