summaryrefslogtreecommitdiffstats
path: root/fs/ext4/migrate.c
diff options
context:
space:
mode:
authorDmitry Monakhov <dmonakhov@openvz.org>2009-12-08 22:42:15 -0500
committerTheodore Ts'o <tytso@mit.edu>2009-12-08 22:42:15 -0500
commit5aca07eb7d8f14d90c740834d15ca15277f4820c (patch)
tree362ab7bb56cf0920ee27bbaf97e2657c022eb4b4 /fs/ext4/migrate.c
parent8aa6790f876e81f5a2211fe1711a5fe3fe2d7b20 (diff)
downloadlinux-5aca07eb7d8f14d90c740834d15ca15277f4820c.tar.gz
linux-5aca07eb7d8f14d90c740834d15ca15277f4820c.tar.bz2
linux-5aca07eb7d8f14d90c740834d15ca15277f4820c.zip
ext4: quota macros cleanup
Currently all quota block reservation macros contains hard-coded "2" aka MAXQUOTAS value. This is no good because in some places it is not obvious to understand what does this digit represent. Let's introduce new macro with self descriptive name. Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Acked-by: Mingming Cao <cmm@us.ibm.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/migrate.c')
-rw-r--r--fs/ext4/migrate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext4/migrate.c b/fs/ext4/migrate.c
index d641e13e740e..81415814b00b 100644
--- a/fs/ext4/migrate.c
+++ b/fs/ext4/migrate.c
@@ -238,7 +238,7 @@ static int extend_credit_for_blkdel(handle_t *handle, struct inode *inode)
* So allocate a credit of 3. We may update
* quota (user and group).
*/
- needed = 3 + 2*EXT4_QUOTA_TRANS_BLOCKS(inode->i_sb);
+ needed = 3 + EXT4_MAXQUOTAS_TRANS_BLOCKS(inode->i_sb);
if (ext4_journal_extend(handle, needed) != 0)
retval = ext4_journal_restart(handle, needed);
@@ -486,7 +486,7 @@ int ext4_ext_migrate(struct inode *inode)
handle = ext4_journal_start(inode,
EXT4_DATA_TRANS_BLOCKS(inode->i_sb) +
EXT4_INDEX_EXTRA_TRANS_BLOCKS + 3 +
- 2 * EXT4_QUOTA_INIT_BLOCKS(inode->i_sb)
+ EXT4_MAXQUOTAS_INIT_BLOCKS(inode->i_sb)
+ 1);
if (IS_ERR(handle)) {
retval = PTR_ERR(handle);