From: Artem Bityutskiy Date: Mon, 20 Oct 2014 14:52:31 +0000 (+0300) Subject: UBIFS: fix budget leak in error path X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=789c89935cef776ab5e8b8c5120d9c29a88ab40e;p=linux-beck.git UBIFS: fix budget leak in error path We forgot to free the budget in 'write_begin_slow()' when 'do_readpage()' fails. This patch fixes the issue. Suggested-by: Kirill A. Shutemov Signed-off-by: Artem Bityutskiy --- diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c index b5b593c45270..538519ee37d9 100644 --- a/fs/ubifs/file.c +++ b/fs/ubifs/file.c @@ -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; } }