f2fs: fix to release discard entries during checkpoint
authorChao Yu <yuchao0@huawei.com>
Tue, 11 Oct 2016 14:57:00 +0000 (22:57 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Wed, 23 Nov 2016 20:10:50 +0000 (12:10 -0800)
commit2dd15654ac0abe587a245a09a7823bbbd588bfb7
tree97703cfaf357c02bc226f04a9952d6db1e290230
parent2411cf5befa5804e4ced4c45a3212d7653869286
f2fs: fix to release discard entries during checkpoint

In f2fs_fill_super, if there is any IO error occurs during recovery,
cached discard entries will be leaked, in order to avoid this, make
write_checkpoint() handle memory release by itself, besides, move
clear_prefree_segments to write_checkpoint for readability.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/checkpoint.c
fs/f2fs/super.c