Skip to content

Commit 5118697

Browse files
chaseyuJaegeuk Kim
authored andcommitted
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>
1 parent c988794 commit 5118697

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/f2fs/data.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,6 +1167,9 @@ static int f2fs_submit_page_read(struct inode *inode, struct page *page,
11671167
f2fs_wait_on_block_writeback(inode, blkaddr);
11681168

11691169
if (bio_add_page(bio, page, PAGE_SIZE, 0) < PAGE_SIZE) {
1170+
iostat_update_and_unbind_ctx(bio);
1171+
if (bio->bi_private)
1172+
mempool_free(bio->bi_private, bio_post_read_ctx_pool);
11701173
bio_put(bio);
11711174
return -EFAULT;
11721175
}

0 commit comments

Comments
 (0)