summaryrefslogtreecommitdiff
path: root/fs/f2fs/node.h
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2018-03-09 09:24:22 +0300
committerJaegeuk Kim <jaegeuk@kernel.org>2018-03-17 07:57:33 +0300
commitc56675750d7c45ce6cc21a67770629aaf41d1491 (patch)
tree61b952c98fac04f320290d4d69168a023da6be16 /fs/f2fs/node.h
parentb91050a80cec3daf5a21f78274330df64a4936a3 (diff)
downloadlinux-c56675750d7c45ce6cc21a67770629aaf41d1491.tar.xz
f2fs: remove unneeded set_cold_node()
When setting COLD_BIT_SHIFT flag in node block, we only need to call set_cold_node() in new_node_page() and recover_inode_page() during node page initialization. So remove unneeded set_cold_node() in other places. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/node.h')
-rw-r--r--fs/f2fs/node.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h
index 081ef0d672bf..e593b4d78be2 100644
--- a/fs/f2fs/node.h
+++ b/fs/f2fs/node.h
@@ -422,12 +422,12 @@ static inline void clear_inline_node(struct page *page)
ClearPageChecked(page);
}
-static inline void set_cold_node(struct inode *inode, struct page *page)
+static inline void set_cold_node(struct page *page, bool is_dir)
{
struct f2fs_node *rn = F2FS_NODE(page);
unsigned int flag = le32_to_cpu(rn->footer.flag);
- if (S_ISDIR(inode->i_mode))
+ if (is_dir)
flag &= ~(0x1 << COLD_BIT_SHIFT);
else
flag |= (0x1 << COLD_BIT_SHIFT);