Skip to content

Commit

Permalink
UBIFS: fix budget leak in error path
Browse files Browse the repository at this point in the history
We forgot to free the budget in 'write_begin_slow()' when 'do_readpage()'
fails. This patch fixes the issue.

Suggested-by: Kirill A. Shutemov <[email protected]>
Signed-off-by: Artem Bityutskiy <[email protected]>
  • Loading branch information
dedekind committed Nov 7, 2014
1 parent 0df1f24 commit 789c899
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/ubifs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ static int write_begin_slow(struct address_space *mapping,
if (err) {
unlock_page(page);
page_cache_release(page);
ubifs_release_budget(c, &req);
return err;
}
}
Expand Down

0 comments on commit 789c899

Please sign in to comment.