Btrfs: fix memory leak of log roots
authorLiu Bo <bo.li.liu@oracle.com>
Wed, 27 Feb 2013 13:28:24 +0000 (13:28 +0000)
committerJosef Bacik <jbacik@fusionio.com>
Thu, 28 Feb 2013 18:33:51 +0000 (13:33 -0500)
commit3321719ed67440bba1b0c5ae19c30d640263ccc8
tree3da1957a0530eeef652efcbffea6709c2d46df09
parentbdc20e67e82cfc4901d3a5a0d79104b0e2296d83
Btrfs: fix memory leak of log roots

When we abort a transaction while fsyncing, we'll skip freeing log roots
part of committing a transaction, which leads to memory leak.

This adds a 'free log roots' in putting super when no more users hold
references on log roots, so it's safe and clean.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/disk-io.c
fs/btrfs/tree-log.c