f2fs: fix to reset i_gc_failures correctly

Let's reset i_gc_failures to zero when we unset pinned state for file.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Chao Yu 2018-07-28 18:37:58 +08:00 committed by Jaegeuk Kim
parent d3f07c049d
commit 3093336481
1 changed files with 1 additions and 1 deletions

View File

@ -2810,7 +2810,7 @@ static int f2fs_ioc_set_pin_file(struct file *filp, unsigned long arg)
if (!pin) {
clear_inode_flag(inode, FI_PIN_FILE);
F2FS_I(inode)->i_gc_failures[GC_FAILURE_PIN] = 1;
f2fs_i_gc_failures_write(inode, 0);
goto done;
}