diff options
author | Dmitry Monakhov <dmonakhov@openvz.org> | 2009-12-08 22:42:28 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-12-14 08:07:58 -0800 |
commit | 224fb952944a6ff5c4032f5cdcf0a73ac45b0702 (patch) | |
tree | 40775847f8a25e2082e070f5a3489971de2ee27f | |
parent | e79220b94468feaf42ec05fe197a8dfe5a782f57 (diff) | |
download | linux-stable-224fb952944a6ff5c4032f5cdcf0a73ac45b0702.tar.gz linux-stable-224fb952944a6ff5c4032f5cdcf0a73ac45b0702.tar.bz2 linux-stable-224fb952944a6ff5c4032f5cdcf0a73ac45b0702.zip |
ext4: fix incorrect block reservation on quota transfer.
(cherry picked from commit 194074acacebc169ded90a4657193f5180015051)
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | fs/ext4/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 3638bc77de7e..292820323792 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -5222,7 +5222,7 @@ int ext4_setattr(struct dentry *dentry, struct iattr *attr) /* (user+group)*(old+new) structure, inode write (sb, * inode block, ? - but truncate inode update has it) */ handle = ext4_journal_start(inode, (EXT4_MAXQUOTAS_INIT_BLOCKS(inode->i_sb)+ - EXT4_QUOTA_DEL_BLOCKS(inode->i_sb))+3); + EXT4_MAXQUOTAS_DEL_BLOCKS(inode->i_sb))+3); if (IS_ERR(handle)) { error = PTR_ERR(handle); goto err_out; |