ext4: Fix memory leak fix when mounting an ext4 filesystem
commit0e84042ca40e55904c9a6ee36cab2b753bd123e9
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Fri, 17 Jul 2009 13:01:04 +0000 (17 09:01 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 14 Dec 2009 16:05:58 +0000 (14 08:05 -0800)
tree25b2a16797a1fe30dedd96a5efad265d7dc12d0b
parentf8ebcb2ebc49a9ce184d738ca8f9bd570ac634b1
ext4: Fix memory leak fix when mounting an ext4 filesystem

(cherry picked from commit 024eab4d5bf7e3168a2b71038b3e04e6b1f376ed)

The allocation of the ext4_group_info array was moved to a new
function ext4_mb_add_group_info() in commit 5f21b0e6 so that online
resize would use a common (and correct) codepath.  Unfortunately, the
call to the new ext4_mb_add_group_info() function was added without
removing the code which originally allocated the array.  This caused a
memory leak each time an ext4 filesystem was mounted.

The fix is simple; remove the code that did the original allocation,
since it is no longer needed.

Reported-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/ext4/mballoc.c