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>
This commit is contained in:
@@ -727,8 +727,7 @@ static int ubifs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
|
||||
struct ubifs_inode *dir_ui = ubifs_inode(dir);
|
||||
struct ubifs_info *c = dir->i_sb->s_fs_info;
|
||||
int err, sz_change = CALC_DENT_SIZE(dentry->d_name.len);
|
||||
struct ubifs_budget_req req = { .new_ino = 1, .new_dent = 1,
|
||||
.dirtied_ino_d = 1 };
|
||||
struct ubifs_budget_req req = { .new_ino = 1, .new_dent = 1 };
|
||||
|
||||
/*
|
||||
* Budget request settings: new inode, new direntry and changing parent
|
||||
|
Reference in New Issue
Block a user