When fsync is called, sync_node_pages finds a proper direct node pages to flush.
But, it locks unrelated direct node pages together unnecessarily.
Acked-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* 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: