diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-07-18 11:54:29 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-08-13 04:20:05 -0400 |
commit | 182854b46f9feb6f1b03abe747bb2beeebf2adb0 (patch) | |
tree | f00db92038f044a3b817799cfd7dd5d5a322d584 /fs/ubifs/budget.c | |
parent | ce769caa50a3fc835b4fc1a6e1463ada127a2e8a (diff) |
UBIFS: fix budgeting calculations
The 'ubifs_release_dirty_inode_budget()' was buggy and incorrectly
freed the budget, which led to not freeing all dirty data budget.
This patch fixes that.
Also, this patch fixes ubifs_mkdir() which passed 1 in dirty_ino_d,
which makes no sense. Well, it is harmless though.
Also, add few more useful assertions. And improve few debugging
messages.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs/budget.c')
-rw-r--r-- | fs/ubifs/budget.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/ubifs/budget.c b/fs/ubifs/budget.c index d81fb9ed2b8e..12a1717db87c 100644 --- a/fs/ubifs/budget.c +++ b/fs/ubifs/budget.c | |||
@@ -686,9 +686,10 @@ void ubifs_convert_page_budget(struct ubifs_info *c) | |||
686 | void ubifs_release_dirty_inode_budget(struct ubifs_info *c, | 686 | void ubifs_release_dirty_inode_budget(struct ubifs_info *c, |
687 | struct ubifs_inode *ui) | 687 | struct ubifs_inode *ui) |
688 | { | 688 | { |
689 | struct ubifs_budget_req req = {.dd_growth = c->inode_budget, | 689 | struct ubifs_budget_req req; |
690 | .dirtied_ino_d = ui->data_len}; | ||
691 | 690 | ||
691 | memset(&req, 0, sizeof(struct ubifs_budget_req)); | ||
692 | req.dd_growth = c->inode_budget + ui->data_len; | ||
692 | ubifs_release_budget(c, &req); | 693 | ubifs_release_budget(c, &req); |
693 | } | 694 | } |
694 | 695 | ||