Skip to content

Commit

Permalink
f2fs: fix to reset i_gc_failures correctly
Browse files Browse the repository at this point in the history
Let's reset i_gc_failures to zero when we unset pinned state for file.

Signed-off-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
  • Loading branch information
chaseyu authored and Jaegeuk Kim committed Sep 18, 2018
1 parent d38c1d7 commit e7cad2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/f2fs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -2618,7 +2618,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;
}

Expand Down

0 comments on commit e7cad2b

Please sign in to comment.