UBIFS: align inode data to eight
UBIFS aligns node lengths to 8, so budgeting has to do the same. Well, direntry, inode, and page budgets are already aligned, but not inode data budget (e.g., data in special devices or symlinks). Do this for inode data as well. Also, add corresponding debugging checks. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
This commit is contained in:
@@ -103,8 +103,8 @@ static int create_xattr(struct ubifs_info *c, struct inode *host,
|
||||
struct inode *inode;
|
||||
struct ubifs_inode *ui, *host_ui = ubifs_inode(host);
|
||||
struct ubifs_budget_req req = { .new_ino = 1, .new_dent = 1,
|
||||
.new_ino_d = size, .dirtied_ino = 1,
|
||||
.dirtied_ino_d = host_ui->data_len};
|
||||
.new_ino_d = size, .dirtied_ino = 1,
|
||||
.dirtied_ino_d = ALIGN(host_ui->data_len, 8)};
|
||||
|
||||
if (host_ui->xattr_cnt >= MAX_XATTRS_PER_INODE)
|
||||
return -ENOSPC;
|
||||
|
Viittaa uudesa ongelmassa
Block a user