From 789c89935cef776ab5e8b8c5120d9c29a88ab40e Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Mon, 20 Oct 2014 17:52:31 +0300 Subject: [PATCH] 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 --- fs/ubifs/file.c | 1 + 1 file changed, 1 insertion(+) 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; } } -- 2.20.1