Commit 3315101f authored by Zhihui Zhang's avatar Zhihui Zhang Committed by 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: default avatarZhihui Zhang <zzhsuny@gmail.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
parent 39936837
...@@ -242,7 +242,7 @@ static inline bool IS_DNODE(struct page *node_page) ...@@ -242,7 +242,7 @@ static inline bool IS_DNODE(struct page *node_page)
return false; return false;
if (ofs >= 6 + 2 * NIDS_PER_BLOCK) { if (ofs >= 6 + 2 * NIDS_PER_BLOCK) {
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 false;
} }
return true; return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment