summary refs log tree commit diff
path: root/fs/f2fs/super.c
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2016-10-11 22:57:00 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2016-11-23 12:10:50 -0800
commit2dd15654ac0abe587a245a09a7823bbbd588bfb7 (patch)
tree97703cfaf357c02bc226f04a9952d6db1e290230 /fs/f2fs/super.c
parent2411cf5befa5804e4ced4c45a3212d7653869286 (diff)
downloadlinux-2dd15654ac0abe587a245a09a7823bbbd588bfb7.tar.gz
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>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r--fs/f2fs/super.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 6132b4ce4e4c..bfa4414d707e 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -738,7 +738,6 @@ static void f2fs_put_super(struct super_block *sb)
 	 * In addition, EIO will skip do checkpoint, we need this as well.
 	 */
 	release_ino_entry(sbi, true);
-	release_discard_addrs(sbi);
 
 	f2fs_leave_shrinker(sbi);
 	mutex_unlock(&sbi->umount_mutex);