Skip to content

Commit

Permalink
exofs: Fix bio leak in error handling path (sync read)
Browse files Browse the repository at this point in the history
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: Boaz Harrosh <bharrosh@panasas.com>
  • Loading branch information
Boaz Harrosh committed Jun 21, 2009
1 parent c277331 commit b76a3f9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/exofs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b76a3f9

Please sign in to comment.