f2fs: fix to clear CP_TRIMMED_FLAG
authorChao Yu <yuchao0@huawei.com>
Wed, 31 Jan 2018 01:30:34 +0000 (09:30 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Sun, 8 Apr 2018 11:07:49 +0000 (04:07 -0700)
commitd4fff1411d4ee644f924e5a8f605db587c87ed90
tree4fff6915b9a08c1c8ef78fcc1f4d86434775f6cd
parentf50100868cb8f823dad59322a08f6f25956569e9
f2fs: fix to clear CP_TRIMMED_FLAG

Once CP_TRIMMED_FLAG is set, after a reboot, we will never issue discard
before LBA becomes invalid again, fix it by clearing the flag in
checkpoint without CP_TRIMMED reason.

Fixes: 1f43e2ad7bff ("f2fs: introduce CP_TRIMMED_FLAG to avoid unneeded discard")
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/checkpoint.c