提交 b76a3f93 编写于 作者: B Boaz Harrosh

exofs: Fix bio leak in error handling path (sync read)

When failing a read request in the sync path, called from
write_begin, I forgot to free the allocated bio, fix it.
Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
上级 c277331d
......@@ -295,6 +295,9 @@ static int read_exec(struct page_collect *pcol, bool is_sync)
err:
if (!is_sync)
_unlock_pcol_pages(pcol, ret, READ);
else /* Pages unlocked by caller in sync mode only free bio */
pcol_free(pcol);
kfree(pcol_copy);
if (or)
osd_end_request(or);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册