Skip to content

Commit

Permalink
Btrfs: fix buffer leak in btrfs_next_old_leaf
Browse files Browse the repository at this point in the history
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 <list.btrfs@jan-o-sch.net>
  • Loading branch information
Jan Schmidt committed Jul 10, 2012
1 parent b630556 commit cf53883
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/btrfs/ctree.c
Original file line number Diff line number Diff line change
Expand Up @@ -5127,6 +5127,7 @@ int btrfs_next_old_leaf(struct btrfs_root *root, struct btrfs_path *path,
* locked. To solve this situation, we give up
* on our lock and cycle.
*/
free_extent_buffer(next);
btrfs_release_path(path);
cond_resched();
goto again;
Expand Down

0 comments on commit cf53883

Please sign in to comment.