diff options
author | Chris Mason <chris.mason@oracle.com> | 2011-08-18 14:38:03 (GMT) |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-08-18 14:38:03 (GMT) |
commit | 81d86e1b70961f4816f961875e0c706b0954acad (patch) | |
tree | ac69ce2e8d174260770d1a84d7d8fe910939c923 /fs/btrfs/free-space-cache.c | |
parent | 9a4327ca1f45f82edad7dc0a4e52ce9316e0950c (diff) | |
parent | f1e490a7ebe41e06324abbbcd86005b0af02a375 (diff) | |
download | linux-fsl-qoriq-81d86e1b70961f4816f961875e0c706b0954acad.tar.xz |
Merge branch 'btrfs-3.0' into for-linus
Diffstat (limited to 'fs/btrfs/free-space-cache.c')
-rw-r--r-- | fs/btrfs/free-space-cache.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index 6377713..6a265b9 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c @@ -1168,9 +1168,9 @@ static void recalculate_thresholds(struct btrfs_free_space_ctl *ctl) div64_u64(extent_bytes, (sizeof(struct btrfs_free_space))); } -static void bitmap_clear_bits(struct btrfs_free_space_ctl *ctl, - struct btrfs_free_space *info, u64 offset, - u64 bytes) +static inline void __bitmap_clear_bits(struct btrfs_free_space_ctl *ctl, + struct btrfs_free_space *info, + u64 offset, u64 bytes) { unsigned long start, count; @@ -1181,6 +1181,13 @@ static void bitmap_clear_bits(struct btrfs_free_space_ctl *ctl, bitmap_clear(info->bitmap, start, count); info->bytes -= bytes; +} + +static void bitmap_clear_bits(struct btrfs_free_space_ctl *ctl, + struct btrfs_free_space *info, u64 offset, + u64 bytes) +{ + __bitmap_clear_bits(ctl, info, offset, bytes); ctl->free_space -= bytes; } @@ -1984,7 +1991,7 @@ static u64 btrfs_alloc_from_bitmap(struct btrfs_block_group_cache *block_group, return 0; ret = search_start; - bitmap_clear_bits(ctl, entry, ret, bytes); + __bitmap_clear_bits(ctl, entry, ret, bytes); return ret; } @@ -2039,7 +2046,6 @@ u64 btrfs_alloc_from_cluster(struct btrfs_block_group_cache *block_group, continue; } } else { - ret = entry->offset; entry->offset += bytes; |