Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185881
b: refs/heads/master
c: 731eb1a
h: refs/heads/master
i:
  185879: 15d9c18
v: v3
  • Loading branch information
Akinobu Mita authored and Theodore Ts'o committed Mar 4, 2010
1 parent a2487bd commit 117a14d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bda00de7e8569b1fcde27b68fa59e74e14c5f93a
refs/heads/master: 731eb1a03a8445cde2cb23ecfb3580c6fa7bb690
3 changes: 0 additions & 3 deletions trunk/fs/ext4/balloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,6 @@ unsigned ext4_init_block_bitmap(struct super_block *sb, struct buffer_head *bh,
* when a file system is mounted (see ext4_fill_super).
*/


#define in_range(b, first, len) ((b) >= (first) && (b) <= (first) + (len) - 1)

/**
* ext4_get_group_desc() -- load group descriptor from disk
* @sb: super block
Expand Down
2 changes: 2 additions & 0 deletions trunk/fs/ext4/ext4.h
Original file line number Diff line number Diff line change
Expand Up @@ -1819,6 +1819,8 @@ static inline void set_bitmap_uptodate(struct buffer_head *bh)
set_bit(BH_BITMAP_UPTODATE, &(bh)->b_state);
}

#define in_range(b, first, len) ((b) >= (first) && (b) <= (first) + (len) - 1)

#endif /* __KERNEL__ */

#endif /* _EXT4_H */
4 changes: 2 additions & 2 deletions trunk/fs/ext4/extents.c
Original file line number Diff line number Diff line change
Expand Up @@ -2051,7 +2051,7 @@ ext4_ext_in_cache(struct inode *inode, ext4_lblk_t block,

BUG_ON(cex->ec_type != EXT4_EXT_CACHE_GAP &&
cex->ec_type != EXT4_EXT_CACHE_EXTENT);
if (block >= cex->ec_block && block < cex->ec_block + cex->ec_len) {
if (in_range(block, cex->ec_block, cex->ec_len)) {
ex->ee_block = cpu_to_le32(cex->ec_block);
ext4_ext_store_pblock(ex, cex->ec_start);
ex->ee_len = cpu_to_le16(cex->ec_len);
Expand Down Expand Up @@ -3364,7 +3364,7 @@ int ext4_ext_get_blocks(handle_t *handle, struct inode *inode,
*/
ee_len = ext4_ext_get_actual_len(ex);
/* if found extent covers block, simply return it */
if (iblock >= ee_block && iblock < ee_block + ee_len) {
if (in_range(iblock, ee_block, ee_len)) {
newblock = iblock - ee_block + ee_start;
/* number of remaining blocks in the extent */
allocated = ee_len - (iblock - ee_block);
Expand Down
2 changes: 0 additions & 2 deletions trunk/fs/ext4/mballoc.h
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,6 @@ struct ext4_buddy {
#define EXT4_MB_BITMAP(e4b) ((e4b)->bd_bitmap)
#define EXT4_MB_BUDDY(e4b) ((e4b)->bd_buddy)

#define in_range(b, first, len) ((b) >= (first) && (b) <= (first) + (len) - 1)

static inline ext4_fsblk_t ext4_grp_offs_to_block(struct super_block *sb,
struct ext4_free_extent *fex)
{
Expand Down

0 comments on commit 117a14d

Please sign in to comment.