summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/file.c
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2018-07-28 12:37:58 +0200
committerJaegeuk Kim <jaegeuk@kernel.org>2018-08-11 01:39:26 +0200
commit3093336481565248ce47557445977eeac21bfca8 (patch)
tree9c80973a3a0bc45bc441ac37ddc91ac9cd3aaabe /fs/f2fs/file.c
parentf2fs: fix invalid memory access (diff)
downloadlinux-3093336481565248ce47557445977eeac21bfca8.tar.xz
linux-3093336481565248ce47557445977eeac21bfca8.zip
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>
Diffstat (limited to 'fs/f2fs/file.c')
-rw-r--r--fs/f2fs/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index a90b4f24aa28..67c9c2d4e2d9 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -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;
}