summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/f2fs/file.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 2d87a3cf6768..91f576a7903c 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -1619,8 +1619,6 @@ static int f2fs_ioc_write_checkpoint(struct file *filp, unsigned long arg)
{
struct inode *inode = file_inode(filp);
struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
- struct cp_control cpc;
- int err;
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
@@ -1628,13 +1626,7 @@ static int f2fs_ioc_write_checkpoint(struct file *filp, unsigned long arg)
if (f2fs_readonly(sbi->sb))
return -EROFS;
- cpc.reason = __get_cp_reason(sbi);
-
- mutex_lock(&sbi->gc_mutex);
- err = write_checkpoint(sbi, &cpc);
- mutex_unlock(&sbi->gc_mutex);
-
- return err;
+ return f2fs_sync_fs(sbi->sb, 1);
}
static int f2fs_defragment_range(struct f2fs_sb_info *sbi,