diff options
author | Dmitry Monakhov <dmonakhov@openvz.org> | 2009-12-08 22:42:15 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2009-12-08 22:42:15 -0500 |
commit | 5aca07eb7d8f14d90c740834d15ca15277f4820c (patch) | |
tree | 362ab7bb56cf0920ee27bbaf97e2657c022eb4b4 /fs/ext4/migrate.c | |
parent | 8aa6790f876e81f5a2211fe1711a5fe3fe2d7b20 (diff) |
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.c | 4 |
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) | |||
238 | * So allocate a credit of 3. We may update | 238 | * So allocate a credit of 3. We may update |
239 | * quota (user and group). | 239 | * quota (user and group). |
240 | */ | 240 | */ |
241 | needed = 3 + 2*EXT4_QUOTA_TRANS_BLOCKS(inode->i_sb); | 241 | needed = 3 + EXT4_MAXQUOTAS_TRANS_BLOCKS(inode->i_sb); |
242 | 242 | ||
243 | if (ext4_journal_extend(handle, needed) != 0) | 243 | if (ext4_journal_extend(handle, needed) != 0) |
244 | retval = ext4_journal_restart(handle, needed); | 244 | retval = ext4_journal_restart(handle, needed); |
@@ -486,7 +486,7 @@ int ext4_ext_migrate(struct inode *inode) | |||
486 | handle = ext4_journal_start(inode, | 486 | handle = ext4_journal_start(inode, |
487 | EXT4_DATA_TRANS_BLOCKS(inode->i_sb) + | 487 | EXT4_DATA_TRANS_BLOCKS(inode->i_sb) + |
488 | EXT4_INDEX_EXTRA_TRANS_BLOCKS + 3 + | 488 | EXT4_INDEX_EXTRA_TRANS_BLOCKS + 3 + |
489 | 2 * EXT4_QUOTA_INIT_BLOCKS(inode->i_sb) | 489 | EXT4_MAXQUOTAS_INIT_BLOCKS(inode->i_sb) |
490 | + 1); | 490 | + 1); |
491 | if (IS_ERR(handle)) { | 491 | if (IS_ERR(handle)) { |
492 | retval = PTR_ERR(handle); | 492 | retval = PTR_ERR(handle); |