Skip to content

Commit fe15bc3

Browse files
chaseyuJaegeuk Kim
authored andcommitted
f2fs: fix error path handling in f2fs_read_data_large_folio()
In error path of f2fs_read_data_large_folio(), if bio is valid, it may submit bio twice, fix it. Signed-off-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
1 parent ec8bb99 commit fe15bc3

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

fs/f2fs/data.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2577,17 +2577,14 @@ static int f2fs_read_data_large_folio(struct inode *inode,
25772577
folio_end_read(folio, !ret);
25782578
return ret;
25792579
}
2580-
2580+
out:
2581+
f2fs_submit_read_bio(F2FS_I_SB(inode), bio, DATA);
25812582
if (ret) {
2582-
f2fs_submit_read_bio(F2FS_I_SB(inode), bio, DATA);
2583-
25842583
/* Wait bios and clear uptodate. */
25852584
folio_lock(folio);
25862585
folio_clear_uptodate(folio);
25872586
folio_unlock(folio);
25882587
}
2589-
out:
2590-
f2fs_submit_read_bio(F2FS_I_SB(inode), bio, DATA);
25912588
return ret;
25922589
}
25932590

0 commit comments

Comments
 (0)