Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e6466e35 authored by Jan Schmidt's avatar Jan Schmidt Committed by Chris Mason
Browse files

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: default avatarJan Schmidt <list.btrfs@jan-o-sch.net>
Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
parent f6175efa
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -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
				 * locked. To solve this situation, we give up
				 * on our lock and cycle.
				 * on our lock and cycle.
				 */
				 */
				free_extent_buffer(next);
				btrfs_release_path(path);
				btrfs_release_path(path);
				cond_resched();
				cond_resched();
				goto again;
				goto again;