[PATCH] UBIFS: fix budget leak in error path
Artem Bityutskiy
dedekind1 at gmail.com
Tue Oct 21 00:13:51 PDT 2014
From: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
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 at linux.intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
---
fs/ubifs/file.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c
index b5b593c..538519e 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;
}
}
--
1.9.3
More information about the linux-mtd
mailing list