]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
f2fs: do not set free of current section
authorYunlong Song <yunlong.song@huawei.com>
Thu, 12 Jul 2018 15:09:26 +0000 (23:09 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Sep 2018 20:41:27 +0000 (22:41 +0200)
commit2ab744266b20b73b9a90b19e07e72881deb0b867
tree6cddc3e8c52ca74788bcf1aa53c8e8efc3f9f6dc
parent9a83044805f93b5c5abf0d1d7771a851460f1c1f
f2fs: do not set free of current section

[ Upstream commit 3611ce9911267cb93d364bd71ddea6821278d11f ]

For the case when sbi->segs_per_sec > 1, take section:segment = 5 for
example, if segment 1 is just used and allocate new segment 2, and the
blocks of segment 1 is invalidated, at this time, the previous code will
use __set_test_and_free to free the free_secmap and free_sections++,
this is not correct since it is still a current section, so fix it.

Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/f2fs/segment.h