]> git.karo-electronics.de Git - linux-beck.git/commitdiff
UBIFS: fix budget leak in error path
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Mon, 20 Oct 2014 14:52:31 +0000 (17:52 +0300)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Fri, 7 Nov 2014 10:08:50 +0000 (12:08 +0200)
We forgot to free the budget in 'write_begin_slow()' when 'do_readpage()'
fails. This patch fixes the issue.

Suggested-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
fs/ubifs/file.c

index b5b593c4527005ba50fe0745f2651095dba79331..538519ee37d939536806fe62ecb55ba8bc9e04b3 100644 (file)
@@ -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;
                        }
                }