Document update
[ct-quota-pq.git] / ext3-quota-setattr-fix.patch
blobb6c142dc440813a45208f8ab0b6f6cfdbdfac094
1 ext3: fix incorrect block reservation on quota transfer.
3 Inside ->setattr() call both ATTR_UID and ATTR_GID may be valid
4 This means that we may end-up with transering all quotas. Add we have
5 to reserve QUOTA_DEL_BLOCKS for all quotas, as we do in case of
6 QUOTA_INIT_BLOCKS.
7 diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c
8 index aa7f639..1c0dc1d 100644
9 --- a/fs/ext3/inode.c
10 +++ b/fs/ext3/inode.c
11 @@ -3103,7 +3103,7 @@ int ext3_setattr(struct dentry *dentry, struct iattr *attr)
12 /* (user+group)*(old+new) structure, inode write (sb,
13 * inode block, ? - but truncate inode update has it) */
14 handle = ext3_journal_start(inode, EXT3_MAXQUOTAS_INIT_BLOCKS(inode->i_sb)+
15 - EXT3_QUOTA_DEL_BLOCKS(inode->i_sb)+3);
16 + EXT3_MAXQUOTAS_DEL_BLOCKS(inode->i_sb)+3);
17 if (IS_ERR(handle)) {
18 error = PTR_ERR(handle);
19 goto err_out;