f2fs: introduce cur_cp_version function to reduce code size

This patch introduces a new inline function, cur_cp_version, to reduce redundant
codes.

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
This commit is contained in:
Jaegeuk Kim
2013-08-09 15:03:21 +09:00
parent e518ff81c3
commit d71b5564c0
5 changed files with 13 additions and 9 deletions

View File

@@ -161,8 +161,7 @@ int f2fs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
need_cp = true;
else if (!is_checkpointed_node(sbi, F2FS_I(inode)->i_pino))
need_cp = true;
else if (F2FS_I(inode)->xattr_ver ==
le64_to_cpu(F2FS_CKPT(sbi)->checkpoint_ver))
else if (F2FS_I(inode)->xattr_ver == cur_cp_version(F2FS_CKPT(sbi)))
need_cp = true;
if (need_cp) {