ext4: fix FITRIM in no journal mode
authorLukas Czerner <lczerner@redhat.com>
Wed, 30 Oct 2013 15:10:52 +0000 (11:10 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 30 Oct 2013 15:10:52 +0000 (11:10 -0400)
commit8f9ff189205a6817aee5a1f996f876541f86e07c
treeb4e8fe39050dda70c0b3bb9bfadc988c4c15a4e5
parent5ba052fe33807893a26076d2ac95cf31d5e0b578
ext4: fix FITRIM in no journal mode

When using FITRIM ioctl on a file system without journal it will
only trim the block group once, no matter how many times you invoke
FITRIM ioctl and how many block you release from the block group.

It is because we only clear EXT4_GROUP_INFO_WAS_TRIMMED_BIT in journal
callback. Fix this by clearing the bit in no journal mode as well.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reported-by: Jorge Fábregas <jorge.fabregas@gmail.com>
fs/ext4/mballoc.c