All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Btrfs: fix buffer leak in btrfs_next_old_leaf
@ 2012-07-04 14:15 Jan Schmidt
  0 siblings, 0 replies; only message in thread
From: Jan Schmidt @ 2012-07-04 14:15 UTC (permalink / raw)
  To: chris.mason, linux-btrfs

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>
---
 fs/btrfs/ctree.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Chris: you can either put it on top of your current for-linus branch,
use it as a fixup to d42244a (part of your for-linus), or even keep it
for the next rc, as that buffer leak should be really rare.

-Jan

diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index 8206b39..67fe46f 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -5127,6 +5127,7 @@ again:
 				 * 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;
-- 
1.7.3.4


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-07-04 14:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-04 14:15 [PATCH] Btrfs: fix buffer leak in btrfs_next_old_leaf Jan Schmidt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.