]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ext4: Fix initalization of s_flex_groups
authorTheodore Ts'o <tytso@mit.edu>
Fri, 11 Sep 2009 20:51:28 +0000 (16:51 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 14 Dec 2009 16:06:39 +0000 (08:06 -0800)
commit1de54d1bc0248c2b0f21e22b48f145271d38cbd5
treeeb3f84c1b605645a0a86099d0e06948ac099108e
parentd78f2ac343787f48e97c87676fccaef850a50cbe
ext4: Fix initalization of s_flex_groups

(cherry picked from commit 7ad9bb651fc2036ea94bed94da76a4b08959a911)

The s_flex_groups array should have been initialized using atomic_add
to sum up the free counts from the block groups that make up a
flex_bg.  By using atomic_set, the value of the s_flex_groups array
was set to the values of the last block group in the flex_bg.

The impact of this bug is that the block and inode allocation
algorithms might not pick the best flex_bg for new allocation.

Thanks to Damien Guibouret for pointing out this problem!

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