summaryrefslogtreecommitdiff
path: root/fs/ubifs/xattr.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-07-24 14:52:45 +0300
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-08-13 11:35:16 +0300
commitdab4b4d2f915a65022343012a795f4ae4ae7e83c (patch)
tree13a1ec2c5f6b18781145bccddf2fb63017a1336b /fs/ubifs/xattr.c
parent547000da6412c45456ff2ff44a171d01027bd727 (diff)
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>
Diffstat (limited to 'fs/ubifs/xattr.c')
-rw-r--r--fs/ubifs/xattr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ubifs/xattr.c b/fs/ubifs/xattr.c
index 1388a078e1a9..39e831d074ce 100644
--- a/fs/ubifs/xattr.c
+++ b/fs/ubifs/xattr.c
@@ -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;