summaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2009-06-11 17:24:47 +0200
committerChris Mason <chris.mason@oracle.com>2009-06-11 17:24:47 +0200
commitb263c2c8bf13c273485bd99dbbeba79c844409dd (patch)
tree8816eaabd20cfce5e37432ecf61cc8303863c48d /fs/btrfs
parentBtrfs: fix oops when btrfs_inherit_iflags called with a NULL dir (diff)
downloadlinux-b263c2c8bf13c273485bd99dbbeba79c844409dd.tar.xz
linux-b263c2c8bf13c273485bd99dbbeba79c844409dd.zip
Btrfs: fix extent_buffer leak during tree log replay
During tree log replay, we read in the tree log roots, process them and then free them. A recent change takes an extra reference on the root node of the tree when the root is read in, and stores that reference in root->commit_root. This reference was not being freed, leaving us with one buffer pinned in ram for each subvol with a tree log root after a crash. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/tree-log.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index 2b41fc08c34a..c13922206d1b 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -3019,6 +3019,7 @@ again:
key.offset = found_key.offset - 1;
wc.replay_dest->log_root = NULL;
free_extent_buffer(log->node);
+ free_extent_buffer(log->commit_root);
kfree(log);
if (found_key.offset == 0)