Skip to contentSkip to conversation

UBIFS: fix budget leak in error path

PATCH New Artem Bityutskiy 1 participant 1 message Oct 21, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 UBIFS: fix budget leak in error path

From: Artem Bityutskiy <[email protected]>

We forgot to free the budget in 'write_begin_slow()' when 'do_readpage()' fails. This patch fixes the issue.

---
 fs/ubifs/file.c | 1 +
 1 file changed, 1 insertion(+)
fs/ubifs/file.c +1 -0
index b5b593c..538519e 100644
@@ -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;
 			}
 		}
Signature · 1 line
1.9.3