From: Zhihui Zhang Date: Sun, 7 Apr 2013 16:57:04 +0000 (-0400) Subject: f2fs: fix the logic of IS_DNODE() X-Git-Tag: accepted/tizen/common/20141203.182822~2290^2~28 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3315101f7070013d01bb5396c6bde07b3a8bcbd8;p=platform%2Fkernel%2Flinux-arm64.git f2fs: fix the logic of IS_DNODE() If (ofs % (NIDS_PER_BLOCK + 1) == 0), the node is an indirect node block. Signed-off-by: Zhihui Zhang Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h index 271a61c..0a2d72f 100644 --- a/fs/f2fs/node.h +++ b/fs/f2fs/node.h @@ -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;