diff options
Diffstat (limited to 'fs/ubifs/dir.c')
-rw-r--r-- | fs/ubifs/dir.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c index a79e850fee6d..eba3a8a7c333 100644 --- a/fs/ubifs/dir.c +++ b/fs/ubifs/dir.c | |||
@@ -525,7 +525,7 @@ static int ubifs_link(struct dentry *old_dentry, struct inode *dir, | |||
525 | struct ubifs_inode *dir_ui = ubifs_inode(dir); | 525 | struct ubifs_inode *dir_ui = ubifs_inode(dir); |
526 | int err, sz_change = CALC_DENT_SIZE(dentry->d_name.len); | 526 | int err, sz_change = CALC_DENT_SIZE(dentry->d_name.len); |
527 | struct ubifs_budget_req req = { .new_dent = 1, .dirtied_ino = 2, | 527 | struct ubifs_budget_req req = { .new_dent = 1, .dirtied_ino = 2, |
528 | .dirtied_ino_d = ui->data_len }; | 528 | .dirtied_ino_d = ALIGN(ui->data_len, 8) }; |
529 | 529 | ||
530 | /* | 530 | /* |
531 | * Budget request settings: new direntry, changing the target inode, | 531 | * Budget request settings: new direntry, changing the target inode, |
@@ -788,7 +788,8 @@ static int ubifs_mknod(struct inode *dir, struct dentry *dentry, | |||
788 | int sz_change = CALC_DENT_SIZE(dentry->d_name.len); | 788 | int sz_change = CALC_DENT_SIZE(dentry->d_name.len); |
789 | int err, devlen = 0; | 789 | int err, devlen = 0; |
790 | struct ubifs_budget_req req = { .new_ino = 1, .new_dent = 1, | 790 | struct ubifs_budget_req req = { .new_ino = 1, .new_dent = 1, |
791 | .new_ino_d = devlen, .dirtied_ino = 1 }; | 791 | .new_ino_d = ALIGN(devlen, 8), |
792 | .dirtied_ino = 1 }; | ||
792 | 793 | ||
793 | /* | 794 | /* |
794 | * Budget request settings: new inode, new direntry and changing parent | 795 | * Budget request settings: new inode, new direntry and changing parent |
@@ -862,7 +863,8 @@ static int ubifs_symlink(struct inode *dir, struct dentry *dentry, | |||
862 | int err, len = strlen(symname); | 863 | int err, len = strlen(symname); |
863 | int sz_change = CALC_DENT_SIZE(dentry->d_name.len); | 864 | int sz_change = CALC_DENT_SIZE(dentry->d_name.len); |
864 | struct ubifs_budget_req req = { .new_ino = 1, .new_dent = 1, | 865 | struct ubifs_budget_req req = { .new_ino = 1, .new_dent = 1, |
865 | .new_ino_d = len, .dirtied_ino = 1 }; | 866 | .new_ino_d = ALIGN(len, 8), |
867 | .dirtied_ino = 1 }; | ||
866 | 868 | ||
867 | /* | 869 | /* |
868 | * Budget request settings: new inode, new direntry and changing parent | 870 | * Budget request settings: new inode, new direntry and changing parent |
@@ -1011,7 +1013,7 @@ static int ubifs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
1011 | struct ubifs_budget_req req = { .new_dent = 1, .mod_dent = 1, | 1013 | struct ubifs_budget_req req = { .new_dent = 1, .mod_dent = 1, |
1012 | .dirtied_ino = 3 }; | 1014 | .dirtied_ino = 3 }; |
1013 | struct ubifs_budget_req ino_req = { .dirtied_ino = 1, | 1015 | struct ubifs_budget_req ino_req = { .dirtied_ino = 1, |
1014 | .dirtied_ino_d = old_inode_ui->data_len }; | 1016 | .dirtied_ino_d = ALIGN(old_inode_ui->data_len, 8) }; |
1015 | struct timespec time; | 1017 | struct timespec time; |
1016 | 1018 | ||
1017 | /* | 1019 | /* |