提交 3315101f 编写于 作者: Z Zhihui Zhang 提交者: Jaegeuk Kim

f2fs: fix the logic of IS_DNODE()

If (ofs % (NIDS_PER_BLOCK + 1) == 0), the node is an indirect node block.
Signed-off-by: NZhihui Zhang <zzhsuny@gmail.com>
Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
上级 39936837
......@@ -242,7 +242,7 @@ static inline bool IS_DNODE(struct page *node_page)
return false;
if (ofs >= 6 + 2 * NIDS_PER_BLOCK) {
ofs -= 6 + 2 * NIDS_PER_BLOCK;
if ((long int)ofs % (NIDS_PER_BLOCK + 1))
if (!((long int)ofs % (NIDS_PER_BLOCK + 1)))
return false;
}
return true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册