Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <zzhsuny@gmail.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>

authored by

Zhihui Zhang and committed by
Jaegeuk Kim
3315101f 39936837

+1 -1
+1 -1
fs/f2fs/node.h
··· 242 242 return false; 243 243 if (ofs >= 6 + 2 * NIDS_PER_BLOCK) { 244 244 ofs -= 6 + 2 * NIDS_PER_BLOCK; 245 - if ((long int)ofs % (NIDS_PER_BLOCK + 1)) 245 + if (!((long int)ofs % (NIDS_PER_BLOCK + 1))) 246 246 return false; 247 247 } 248 248 return true;