From 43c242863b255be3c4da85e6cce902bad018231d Mon Sep 17 00:00:00 2001 From: Zoltan Sogor Date: Tue, 12 Aug 2008 13:54:54 +0300 Subject: [PATCH] --- yaml --- r: 108554 b: refs/heads/master c: 5acd6ff8ac09eb71f3aef2ccccefab658be8aff4 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/ubifs/xattr.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 21a36b62b1d8..ab157ff27f9b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 840dc6b891d521f18bf081bd5a32e4a1f8110abc +refs/heads/master: 5acd6ff8ac09eb71f3aef2ccccefab658be8aff4 diff --git a/trunk/fs/ubifs/xattr.c b/trunk/fs/ubifs/xattr.c index 39e831d074ce..6f493dea561e 100644 --- a/trunk/fs/ubifs/xattr.c +++ b/trunk/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 = ALIGN(host_ui->data_len, 8)}; + .new_ino_d = ALIGN(size, 8), .dirtied_ino = 1, + .dirtied_ino_d = ALIGN(host_ui->data_len, 8) }; if (host_ui->xattr_cnt >= MAX_XATTRS_PER_INODE) return -ENOSPC; @@ -200,7 +200,7 @@ static int change_xattr(struct ubifs_info *c, struct inode *host, struct ubifs_inode *host_ui = ubifs_inode(host); struct ubifs_inode *ui = ubifs_inode(inode); struct ubifs_budget_req req = { .dirtied_ino = 2, - .dirtied_ino_d = size + host_ui->data_len }; + .dirtied_ino_d = ALIGN(size, 8) + ALIGN(host_ui->data_len, 8) }; ubifs_assert(ui->data_len == inode->i_size); err = ubifs_budget_space(c, &req); @@ -497,8 +497,8 @@ static int remove_xattr(struct ubifs_info *c, struct inode *host, int err; struct ubifs_inode *host_ui = ubifs_inode(host); struct ubifs_inode *ui = ubifs_inode(inode); - struct ubifs_budget_req req = { .dirtied_ino = 1, .mod_dent = 1, - .dirtied_ino_d = host_ui->data_len }; + struct ubifs_budget_req req = { .dirtied_ino = 2, .mod_dent = 1, + .dirtied_ino_d = ALIGN(host_ui->data_len, 8) }; ubifs_assert(ui->data_len == inode->i_size);