mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-16 21:35:07 +00:00
f2fs: fix error path of f2fs_submit_page_read()
In error path of f2fs_submit_page_read(), it missed to call iostat_update_and_unbind_ctx() and free bio_post_read_ctx, fix it. Signed-off-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
c988794984
commit
5118697f72
@ -1167,6 +1167,9 @@ static int f2fs_submit_page_read(struct inode *inode, struct page *page,
|
|||||||
f2fs_wait_on_block_writeback(inode, blkaddr);
|
f2fs_wait_on_block_writeback(inode, blkaddr);
|
||||||
|
|
||||||
if (bio_add_page(bio, page, PAGE_SIZE, 0) < PAGE_SIZE) {
|
if (bio_add_page(bio, page, PAGE_SIZE, 0) < PAGE_SIZE) {
|
||||||
|
iostat_update_and_unbind_ctx(bio);
|
||||||
|
if (bio->bi_private)
|
||||||
|
mempool_free(bio->bi_private, bio_post_read_ctx_pool);
|
||||||
bio_put(bio);
|
bio_put(bio);
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user