diff options
author | Yongqiang Yang <xiaoqiangnk@gmail.com> | 2011-10-29 09:29:11 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2011-10-29 09:29:11 -0400 |
commit | 02dc62fba89eaee0157752c5f1ba811ef3156e00 (patch) | |
tree | d1f8ba664676570fbd6354a8299b0703901a760d /fs/ext4/extents.c | |
parent | 81fdbb4a8d34242f0ed048395c4ddc910f1dffbe (diff) | |
download | linux-3.10-02dc62fba89eaee0157752c5f1ba811ef3156e00.tar.gz linux-3.10-02dc62fba89eaee0157752c5f1ba811ef3156e00.tar.bz2 linux-3.10-02dc62fba89eaee0157752c5f1ba811ef3156e00.zip |
ext4: clean up AGGRESSIVE_TEST code
Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/extents.c')
-rw-r--r-- | fs/ext4/extents.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 05693804813..652b4dc5dfc 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -181,12 +181,10 @@ static inline int ext4_ext_space_block(struct inode *inode, int check) size = (inode->i_sb->s_blocksize - sizeof(struct ext4_extent_header)) / sizeof(struct ext4_extent); - if (!check) { #ifdef AGGRESSIVE_TEST - if (size > 6) - size = 6; + if (!check && size > 6) + size = 6; #endif - } return size; } @@ -196,12 +194,10 @@ static inline int ext4_ext_space_block_idx(struct inode *inode, int check) size = (inode->i_sb->s_blocksize - sizeof(struct ext4_extent_header)) / sizeof(struct ext4_extent_idx); - if (!check) { #ifdef AGGRESSIVE_TEST - if (size > 5) - size = 5; + if (!check && size > 5) + size = 5; #endif - } return size; } @@ -212,12 +208,10 @@ static inline int ext4_ext_space_root(struct inode *inode, int check) size = sizeof(EXT4_I(inode)->i_data); size -= sizeof(struct ext4_extent_header); size /= sizeof(struct ext4_extent); - if (!check) { #ifdef AGGRESSIVE_TEST - if (size > 3) - size = 3; + if (!check && size > 3) + size = 3; #endif - } return size; } @@ -228,12 +222,10 @@ static inline int ext4_ext_space_root_idx(struct inode *inode, int check) size = sizeof(EXT4_I(inode)->i_data); size -= sizeof(struct ext4_extent_header); size /= sizeof(struct ext4_extent_idx); - if (!check) { #ifdef AGGRESSIVE_TEST - if (size > 4) - size = 4; + if (!check && size > 4) + size = 4; #endif - } return size; } |