From: Zhihui Zhang Date: Sun, 7 Apr 2013 16:57:04 +0000 (-0400) Subject: f2fs: fix the logic of IS_DNODE() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=3315101f7070013d01bb5396c6bde07b3a8bcbd8;p=openwrt%2Fstaging%2Fblogic.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 271a61c25601..0a2d72f0024d 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;