mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 01:53:29 +02:00
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>
This commit is contained in:
parent
ec8bb999dc
commit
fe15bc3d44
|
|
@ -2577,17 +2577,14 @@ static int f2fs_read_data_large_folio(struct inode *inode,
|
|||
folio_end_read(folio, !ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
out:
|
||||
f2fs_submit_read_bio(F2FS_I_SB(inode), bio, DATA);
|
||||
if (ret) {
|
||||
f2fs_submit_read_bio(F2FS_I_SB(inode), bio, DATA);
|
||||
|
||||
/* Wait bios and clear uptodate. */
|
||||
folio_lock(folio);
|
||||
folio_clear_uptodate(folio);
|
||||
folio_unlock(folio);
|
||||
}
|
||||
out:
|
||||
f2fs_submit_read_bio(F2FS_I_SB(inode), bio, DATA);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user