ext4: don't count free clusters from a corrupt block group
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 31 Oct 2013 15:46:31 +0000 (11:46 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 31 Oct 2013 15:46:31 +0000 (11:46 -0400)
A bg that's been flagged "corrupt" by definition has no free blocks,
so that the allocator won't be tempted to use the damaged bg.
Therefore, we shouldn't count the clusters in the damaged group when
calculating free counts.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Zheng Liu <wenqing.lz@taobao.com>
fs/ext4/balloc.c

Simple merge