summaryrefslogtreecommitdiff
path: root/fs/btrfs/extent-tree.c
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2015-11-27 19:12:00 +0300
committerFilipe Manana <fdmanana@suse.com>2015-12-17 13:59:48 +0300
commit7785a663c4beebdafeb300caf2818e7e6474abd1 (patch)
treefea9a8efe93a6cedb875f325b735be7ce053bcd1 /fs/btrfs/extent-tree.c
parent50460e37186a2b932eacea24dca804bd1bcd2012 (diff)
downloadlinux-7785a663c4beebdafeb300caf2818e7e6474abd1.tar.xz
Btrfs: fix memory leaks after transaction is aborted
When a transaction is aborted, or its commit fails before writing the new superblock and calling btrfs_finish_extent_commit(), we leak reference counts on the block groups attached to the transaction's delete_bgs list, because btrfs_finish_extent_commit() is never called for those two cases. Fix this by dropping their references at btrfs_put_transaction(), which is called when transactions are aborted (by making the transaction kthread commit the transaction) or if their commits fail. Signed-off-by: Filipe Manana <fdmanana@suse.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
0 files changed, 0 insertions, 0 deletions