diff options
| author | Chao Yu <chao2.yu@samsung.com> | 2015-12-24 18:11:32 +0800 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-13 12:32:41 +0200 |
| commit | 3613cac6d2eabb1a851ee1fb8e9f6ecd72d4be6f (patch) | |
| tree | 3d135566570583cbc2da4a84969775e0fb464f93 | |
| parent | 77e85211d6d07e9f3a7224c55d7da83fedd615fb (diff) | |
f2fs: clean up f2fs_ioc_write_checkpoint
Use f2fs_sync_fs to clean up codes in f2fs_ioc_write_checkpoint.
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
[Jaegeuk Kim: remove unused err variable]
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| -rw-r--r-- | fs/f2fs/file.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 139a71df9..85f226b78 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -1640,8 +1640,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; @@ -1649,13 +1647,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, |
