diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 62982e671d1808f5dc594b3cdbe403764a16fc7f..771725650c0d053b45ad456f28fe8f1b749038a6 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -315,7 +315,8 @@ static void set_node_addr(struct f2fs_sb_info *sbi, struct node_info *ni, __set_nat_cache_dirty(nm_i, e); /* update fsync_mark if its inode nat entry is still alive */ - e = __lookup_nat_cache(nm_i, ni->ino); + if (ni->nid != ni->ino) + e = __lookup_nat_cache(nm_i, ni->ino); if (e) { if (fsync_done && ni->nid == ni->ino) set_nat_flag(e, HAS_FSYNCED_INODE, true);