diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 57bea2182f30..cd147e7c71e8 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -875,6 +875,9 @@ static void gc_data_segment(struct f2fs_sb_info *sbi, struct f2fs_summary *sum, continue; } locked = true; + + /* wait for all inflight aio data */ + inode_dio_wait(inode); } start_bidx = start_bidx_of_node(nofs, inode)