aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/inode.c
diff options
context:
space:
mode:
authorDmitry Monakhov <dmonakhov@openvz.org>2009-12-08 22:42:28 -0500
committerTheodore Ts'o <tytso@mit.edu>2009-12-08 22:42:28 -0500
commit194074acacebc169ded90a4657193f5180015051 (patch)
tree6661f85c6ef4548abe348c2611ad8a43b17ec320 /fs/ext4/inode.c
parent5aca07eb7d8f14d90c740834d15ca15277f4820c (diff)
ext4: fix incorrect block reservation on quota transfer.
Inside ->setattr() call both ATTR_UID and ATTR_GID may be valid This means that we may end-up with transferring all quotas. Add we have to reserve QUOTA_DEL_BLOCKS for all quotas, as we do in case of QUOTA_INIT_BLOCKS. Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Reviewed-by: Mingming Cao <cmm@us.ibm.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r--fs/ext4/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 1b1b7d91811..958c3ff800e 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -5176,7 +5176,7 @@ int ext4_setattr(struct dentry *dentry, struct iattr *attr)
5176 /* (user+group)*(old+new) structure, inode write (sb, 5176 /* (user+group)*(old+new) structure, inode write (sb,
5177 * inode block, ? - but truncate inode update has it) */ 5177 * inode block, ? - but truncate inode update has it) */
5178 handle = ext4_journal_start(inode, (EXT4_MAXQUOTAS_INIT_BLOCKS(inode->i_sb)+ 5178 handle = ext4_journal_start(inode, (EXT4_MAXQUOTAS_INIT_BLOCKS(inode->i_sb)+
5179 EXT4_QUOTA_DEL_BLOCKS(inode->i_sb))+3); 5179 EXT4_MAXQUOTAS_DEL_BLOCKS(inode->i_sb))+3);
5180 if (IS_ERR(handle)) { 5180 if (IS_ERR(handle)) {
5181 error = PTR_ERR(handle); 5181 error = PTR_ERR(handle);
5182 goto err_out; 5182 goto err_out;