summaryrefslogtreecommitdiff
path: root/fs/f2fs/file.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk.kim@samsung.com>2013-03-20 05:58:38 (GMT)
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2013-03-27 00:16:16 (GMT)
commit0ff153a2f1fa7ef31d6d9bc9ce6c3815dede55e6 (patch)
treef9bf94683b0c9f19ff3606e94eceae5e6b60b7d9 /fs/f2fs/file.c
parent6ead114232f786e3ef7a034c8617f2a4df8e5226 (diff)
downloadlinux-fsl-qoriq-0ff153a2f1fa7ef31d6d9bc9ce6c3815dede55e6.tar.xz
f2fs: do not skip writing file meta during fsync
This patch removes data_version check flow during the fsync call. The original purpose for the use of data_version was to avoid writng inode pages redundantly by the fsync calls repeatedly. However, when user can modify file meta and then call fsync, we should not skip fsync procedure. So, let's remove this condition check and hope that user triggers in right manner. Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/file.c')
-rw-r--r--fs/f2fs/file.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index ff018a4..d65fcad 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -124,7 +124,6 @@ int f2fs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
{
struct inode *inode = file->f_mapping->host;
struct f2fs_sb_info *sbi = F2FS_SB(inode->i_sb);
- unsigned long long cur_version;
int ret = 0;
bool need_cp = false;
struct writeback_control wbc = {
@@ -148,15 +147,6 @@ int f2fs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
if (datasync && !(inode->i_state & I_DIRTY_DATASYNC))
goto out;
- mutex_lock(&sbi->cp_mutex);
- cur_version = le64_to_cpu(F2FS_CKPT(sbi)->checkpoint_ver);
- mutex_unlock(&sbi->cp_mutex);
-
- if (F2FS_I(inode)->data_version != cur_version &&
- !(inode->i_state & I_DIRTY))
- goto out;
- F2FS_I(inode)->data_version--;
-
if (!S_ISREG(inode->i_mode) || inode->i_nlink != 1)
need_cp = true;
else if (is_inode_flag_set(F2FS_I(inode), FI_NEED_CP))