aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/dir.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-07-18 11:54:29 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-08-13 04:20:05 -0400
commit182854b46f9feb6f1b03abe747bb2beeebf2adb0 (patch)
treef00db92038f044a3b817799cfd7dd5d5a322d584 /fs/ubifs/dir.c
parentce769caa50a3fc835b4fc1a6e1463ada127a2e8a (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/dir.c')
-rw-r--r--fs/ubifs/dir.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c
index e90374be7d3b..a79e850fee6d 100644
--- a/fs/ubifs/dir.c
+++ b/fs/ubifs/dir.c
@@ -727,8 +727,7 @@ static int ubifs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
727 struct ubifs_inode *dir_ui = ubifs_inode(dir); 727 struct ubifs_inode *dir_ui = ubifs_inode(dir);
728 struct ubifs_info *c = dir->i_sb->s_fs_info; 728 struct ubifs_info *c = dir->i_sb->s_fs_info;
729 int err, sz_change = CALC_DENT_SIZE(dentry->d_name.len); 729 int err, sz_change = CALC_DENT_SIZE(dentry->d_name.len);
730 struct ubifs_budget_req req = { .new_ino = 1, .new_dent = 1, 730 struct ubifs_budget_req req = { .new_ino = 1, .new_dent = 1 };
731 .dirtied_ino_d = 1 };
732 731
733 /* 732 /*
734 * Budget request settings: new inode, new direntry and changing parent 733 * Budget request settings: new inode, new direntry and changing parent