aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs
diff options
context:
space:
mode:
authorChangman Lee <cm224.lee@samsung.com>2013-01-31 03:16:56 -0500
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2013-02-11 17:15:01 -0500
commitfacb0205401a6ce4be410e1f4b9357bbc6caa36a (patch)
treea5bebda2f25fe616a65edaadd2c879d0d110e0a0 /fs/f2fs
parentd4686d56ec912d55fd8a9d6d509de50de24e90ab (diff)
f2fs: stop repeated checking if cp is needed
If it is decided that f2fs should do checkpoint, skip next comparison. Signed-off-by: Changman Lee <cm224.lee@samsung.com>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 3efa4739b00c..33d1736ee5f9 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -157,11 +157,11 @@ int f2fs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
157 157
158 if (!S_ISREG(inode->i_mode) || inode->i_nlink != 1) 158 if (!S_ISREG(inode->i_mode) || inode->i_nlink != 1)
159 need_cp = true; 159 need_cp = true;
160 if (is_inode_flag_set(F2FS_I(inode), FI_NEED_CP)) 160 else if (is_inode_flag_set(F2FS_I(inode), FI_NEED_CP))
161 need_cp = true; 161 need_cp = true;
162 if (!space_for_roll_forward(sbi)) 162 else if (!space_for_roll_forward(sbi))
163 need_cp = true; 163 need_cp = true;
164 if (need_to_sync_dir(sbi, inode)) 164 else if (need_to_sync_dir(sbi, inode))
165 need_cp = true; 165 need_cp = true;
166 166
167 if (need_cp) { 167 if (need_cp) {