diff options
author | Josef Bacik <josef@redhat.com> | 2012-01-18 10:56:06 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2012-03-26 14:42:51 -0400 |
commit | 81c9ad237c604adec79fd4d4034264c6669e0ab3 (patch) | |
tree | 673fe5a1c491d43fae6f4309aa699b4e328d534e /fs/btrfs/inode.c | |
parent | 285ff5af6ce358e73f53b55c9efadd4335f4c2ff (diff) |
Btrfs: remove search_start and search_end from find_free_extent and callers
We have been passing nothing but (u64)-1 to find_free_extent for search_end in
all of the callers, so it's completely useless, and we've always been passing 0
in as search_start, so just remove them as function arguments and move
search_start into find_free_extent. Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 892b34785ccc..bb268193d85d 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -634,8 +634,7 @@ retry: | |||
634 | ret = btrfs_reserve_extent(trans, root, | 634 | ret = btrfs_reserve_extent(trans, root, |
635 | async_extent->compressed_size, | 635 | async_extent->compressed_size, |
636 | async_extent->compressed_size, | 636 | async_extent->compressed_size, |
637 | 0, alloc_hint, | 637 | 0, alloc_hint, &ins, 1); |
638 | (u64)-1, &ins, 1); | ||
639 | btrfs_end_transaction(trans, root); | 638 | btrfs_end_transaction(trans, root); |
640 | 639 | ||
641 | if (ret) { | 640 | if (ret) { |
@@ -838,7 +837,7 @@ static noinline int cow_file_range(struct inode *inode, | |||
838 | cur_alloc_size = disk_num_bytes; | 837 | cur_alloc_size = disk_num_bytes; |
839 | ret = btrfs_reserve_extent(trans, root, cur_alloc_size, | 838 | ret = btrfs_reserve_extent(trans, root, cur_alloc_size, |
840 | root->sectorsize, 0, alloc_hint, | 839 | root->sectorsize, 0, alloc_hint, |
841 | (u64)-1, &ins, 1); | 840 | &ins, 1); |
842 | BUG_ON(ret); | 841 | BUG_ON(ret); |
843 | 842 | ||
844 | em = alloc_extent_map(); | 843 | em = alloc_extent_map(); |
@@ -5414,7 +5413,7 @@ static struct extent_map *btrfs_new_extent_direct(struct inode *inode, | |||
5414 | 5413 | ||
5415 | alloc_hint = get_extent_allocation_hint(inode, start, len); | 5414 | alloc_hint = get_extent_allocation_hint(inode, start, len); |
5416 | ret = btrfs_reserve_extent(trans, root, len, root->sectorsize, 0, | 5415 | ret = btrfs_reserve_extent(trans, root, len, root->sectorsize, 0, |
5417 | alloc_hint, (u64)-1, &ins, 1); | 5416 | alloc_hint, &ins, 1); |
5418 | if (ret) { | 5417 | if (ret) { |
5419 | em = ERR_PTR(ret); | 5418 | em = ERR_PTR(ret); |
5420 | goto out; | 5419 | goto out; |
@@ -7315,7 +7314,7 @@ static int __btrfs_prealloc_file_range(struct inode *inode, int mode, | |||
7315 | } | 7314 | } |
7316 | 7315 | ||
7317 | ret = btrfs_reserve_extent(trans, root, num_bytes, min_size, | 7316 | ret = btrfs_reserve_extent(trans, root, num_bytes, min_size, |
7318 | 0, *alloc_hint, (u64)-1, &ins, 1); | 7317 | 0, *alloc_hint, &ins, 1); |
7319 | if (ret) { | 7318 | if (ret) { |
7320 | if (own_trans) | 7319 | if (own_trans) |
7321 | btrfs_end_transaction(trans, root); | 7320 | btrfs_end_transaction(trans, root); |