diff options
Diffstat (limited to 'fs/ext4/mballoc.h')
-rw-r--r-- | fs/ext4/mballoc.h | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/ext4/mballoc.h b/fs/ext4/mballoc.h index 436521cae456..b619322c76f0 100644 --- a/fs/ext4/mballoc.h +++ b/fs/ext4/mballoc.h | |||
@@ -220,16 +220,9 @@ struct ext4_buddy { | |||
220 | #define EXT4_MB_BITMAP(e4b) ((e4b)->bd_bitmap) | 220 | #define EXT4_MB_BITMAP(e4b) ((e4b)->bd_bitmap) |
221 | #define EXT4_MB_BUDDY(e4b) ((e4b)->bd_buddy) | 221 | #define EXT4_MB_BUDDY(e4b) ((e4b)->bd_buddy) |
222 | 222 | ||
223 | #define in_range(b, first, len) ((b) >= (first) && (b) <= (first) + (len) - 1) | ||
224 | |||
225 | static inline ext4_fsblk_t ext4_grp_offs_to_block(struct super_block *sb, | 223 | static inline ext4_fsblk_t ext4_grp_offs_to_block(struct super_block *sb, |
226 | struct ext4_free_extent *fex) | 224 | struct ext4_free_extent *fex) |
227 | { | 225 | { |
228 | ext4_fsblk_t block; | 226 | return ext4_group_first_block_no(sb, fex->fe_group) + fex->fe_start; |
229 | |||
230 | block = (ext4_fsblk_t) fex->fe_group * EXT4_BLOCKS_PER_GROUP(sb) | ||
231 | + fex->fe_start | ||
232 | + le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_block); | ||
233 | return block; | ||
234 | } | 227 | } |
235 | #endif | 228 | #endif |