summaryrefslogtreecommitdiffstats
path: root/fs/ext4/move_extent.c
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2009-09-17 11:55:58 -0400
committerTheodore Ts'o <tytso@mit.edu>2009-09-17 11:55:58 -0400
commit0a80e9867db154966b2a771042e10452ac110e1e (patch)
tree51f43830b3c0dd733b0d446399eb3ea2b6bc84ed /fs/ext4/move_extent.c
parent5534fb5bb35a62a94e0bd1fa2421f7fb6e894f10 (diff)
downloadlinux-0a80e9867db154966b2a771042e10452ac110e1e.tar.gz
linux-0a80e9867db154966b2a771042e10452ac110e1e.tar.bz2
linux-0a80e9867db154966b2a771042e10452ac110e1e.zip
ext4: replace MAX_DEFRAG_SIZE with EXT_MAX_BLOCK
There's no reason to redefine the maximum allowable offset in an extent-based file just for defrag; EXT_MAX_BLOCK already does this. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/move_extent.c')
-rw-r--r--fs/ext4/move_extent.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c
index 1f027b1ec430..c07a2915e40b 100644
--- a/fs/ext4/move_extent.c
+++ b/fs/ext4/move_extent.c
@@ -1040,12 +1040,12 @@ mext_check_arguments(struct inode *orig_inode,
return -EINVAL;
}
- if ((orig_start > MAX_DEFRAG_SIZE) ||
- (donor_start > MAX_DEFRAG_SIZE) ||
- (*len > MAX_DEFRAG_SIZE) ||
- (orig_start + *len > MAX_DEFRAG_SIZE)) {
- ext4_debug("ext4 move extent: Can't handle over [%lu] blocks "
- "[ino:orig %lu, donor %lu]\n", MAX_DEFRAG_SIZE,
+ if ((orig_start > EXT_MAX_BLOCK) ||
+ (donor_start > EXT_MAX_BLOCK) ||
+ (*len > EXT_MAX_BLOCK) ||
+ (orig_start + *len > EXT_MAX_BLOCK)) {
+ ext4_debug("ext4 move extent: Can't handle over [%u] blocks "
+ "[ino:orig %lu, donor %lu]\n", EXT_MAX_BLOCK,
orig_inode->i_ino, donor_inode->i_ino);
return -EINVAL;
}