Document update
[ct-quota-pq.git] / ext4-quota-setattr-fix.patch
blobecf98d1a1fbcfc5174f6442aa94f2031dbf5a0c7
1 ext4: 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/ext4/inode.c b/fs/ext4/inode.c
8 index 08964b9..0a0b986 100644
9 --- a/fs/ext4/inode.c
10 +++ b/fs/ext4/inode.c
11 @@ -5222,7 +5222,7 @@ int ext4_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 = ext4_journal_start(inode, (EXT4_MAXQUOTAS_INIT_BLOCKS(inode->i_sb)+
15 - EXT4_QUOTA_DEL_BLOCKS(inode->i_sb))+3);
16 + EXT4_MAXQUOTAS_DEL_BLOCKS(inode->i_sb))+3);
17 if (IS_ERR(handle)) {
18 error = PTR_ERR(handle);
19 goto err_out;