]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ext4: fix memory leak in ext4_free_branches
authorTheodore Ts'o <tytso@mit.edu>
Mon, 10 Jan 2011 17:51:28 +0000 (12:51 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 17 Feb 2011 22:47:06 +0000 (14:47 -0800)
commit8cd8793363cd536a18f36f923788b2eabcdfbbcf
treed05f49f1d477a60c56db48aacd4ecc4c4a92f2a5
parent9166c290bea610c0283cbf91e12bf7baa7134e87
ext4: fix memory leak in ext4_free_branches

commit 1c5b9e9065567876c2d4a7a16d78f0fed154a5bf upstream.

Commit 40389687 moved a call to ext4_forget() out of
ext4_free_branches and let ext4_free_blocks() handle calling
bforget().  But that change unfortunately did not replace the call to
ext4_forget() with brelse(), which was needed to drop the in-use count
of the indirect block's buffer head, which lead to a memory leak when
deleting files that used indirect blocks.  Fix this.

Thanks to Hugh Dickins for pointing this out.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/ext4/inode.c