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

Signed-off-by: Chao Yu <[email protected]>
---
 fs/f2fs/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index ed5c9b0e0d0c..22c83da0d5e2 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -2818,7 +2818,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;
        }
 
-- 
2.18.0.rc1


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to