Skip to content

Commit

Permalink
f2fs: stop repeated checking if cp is needed
Browse files Browse the repository at this point in the history
If it is decided that f2fs should do checkpoint, skip next comparison.

Signed-off-by: Changman Lee <cm224.lee@samsung.com>
  • Loading branch information
Changman Lee authored and Jaegeuk Kim committed Feb 11, 2013
1 parent d4686d5 commit facb020
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fs/f2fs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,11 @@ int f2fs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)

if (!S_ISREG(inode->i_mode) || inode->i_nlink != 1)
need_cp = true;
if (is_inode_flag_set(F2FS_I(inode), FI_NEED_CP))
else if (is_inode_flag_set(F2FS_I(inode), FI_NEED_CP))
need_cp = true;
if (!space_for_roll_forward(sbi))
else if (!space_for_roll_forward(sbi))
need_cp = true;
if (need_to_sync_dir(sbi, inode))
else if (need_to_sync_dir(sbi, inode))
need_cp = true;

if (need_cp) {
Expand Down

0 comments on commit facb020

Please sign in to comment.