mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 06:30:54 +07:00
f2fs: fix ERR_PTR returned by bio
This is to fix wrong error pointer handling flow reported by Dan. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
b56ab837a0
commit
1d353eb7e4
@ -1085,8 +1085,10 @@ static int f2fs_mpage_readpages(struct address_space *mapping,
|
||||
}
|
||||
if (bio == NULL) {
|
||||
bio = f2fs_grab_bio(inode, block_nr, nr_pages);
|
||||
if (IS_ERR(bio))
|
||||
if (IS_ERR(bio)) {
|
||||
bio = NULL;
|
||||
goto set_error_page;
|
||||
}
|
||||
}
|
||||
|
||||
if (bio_add_page(bio, page, blocksize, 0) < blocksize)
|
||||
|
Loading…
Reference in New Issue
Block a user