diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 095fc2c96e16e3b8ba85af4a3ad3703b53af8ce7..cccee5006cddf2131da53ef4f2594a814090ba82 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1272,10 +1272,14 @@ int sync_node_pages(struct f2fs_sb_info *sbi, nid_t ino, * we should not skip writing node pages. */ lock_node: - if (ino && ino_of_node(page) == ino) - lock_page(page); - else if (!trylock_page(page)) + if (ino) { + if (ino_of_node(page) == ino) + lock_page(page); + else + continue; + } else if (!trylock_page(page)) { continue; + } if (unlikely(page->mapping != NODE_MAPPING(sbi))) { continue_unlock: