aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fusionio.com>2012-08-29 12:24:27 -0400
committerChris Mason <chris.mason@fusionio.com>2012-10-01 15:19:06 -0400
commit2671485d395c07fca104c972785898d7c52fc942 (patch)
treed87e1fa2265155c05718a9e8486a66a76df86b76 /fs/btrfs/inode.c
parentd2794405113cd04f13a58e32e4d541dc87ec86e4 (diff)
Btrfs: remove unused hint byte argument for btrfs_drop_extents
I audited all users of btrfs_drop_extents and found that nobody actually uses the hint_byte argument. I'm sure it was used for something at some point but it's not used now, and the way the pinning works the disk bytenr would never be immediately useful anyway so lets just remove it. Thanks, Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 24745b8f2745..f0a4792492ed 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -230,7 +230,6 @@ static noinline int cow_file_range_inline(struct btrfs_trans_handle *trans,
230 u64 inline_len = actual_end - start; 230 u64 inline_len = actual_end - start;
231 u64 aligned_end = (end + root->sectorsize - 1) & 231 u64 aligned_end = (end + root->sectorsize - 1) &
232 ~((u64)root->sectorsize - 1); 232 ~((u64)root->sectorsize - 1);
233 u64 hint_byte;
234 u64 data_len = inline_len; 233 u64 data_len = inline_len;
235 int ret; 234 int ret;
236 235
@@ -247,8 +246,7 @@ static noinline int cow_file_range_inline(struct btrfs_trans_handle *trans,
247 return 1; 246 return 1;
248 } 247 }
249 248
250 ret = btrfs_drop_extents(trans, root, inode, start, aligned_end, 249 ret = btrfs_drop_extents(trans, root, inode, start, aligned_end, 1);
251 &hint_byte, 1);
252 if (ret) 250 if (ret)
253 return ret; 251 return ret;
254 252
@@ -1786,7 +1784,6 @@ static int insert_reserved_file_extent(struct btrfs_trans_handle *trans,
1786 struct btrfs_path *path; 1784 struct btrfs_path *path;
1787 struct extent_buffer *leaf; 1785 struct extent_buffer *leaf;
1788 struct btrfs_key ins; 1786 struct btrfs_key ins;
1789 u64 hint;
1790 int ret; 1787 int ret;
1791 1788
1792 path = btrfs_alloc_path(); 1789 path = btrfs_alloc_path();
@@ -1805,8 +1802,7 @@ static int insert_reserved_file_extent(struct btrfs_trans_handle *trans,
1805 * with the others. 1802 * with the others.
1806 */ 1803 */
1807 ret = btrfs_drop_extents(trans, root, inode, file_pos, 1804 ret = btrfs_drop_extents(trans, root, inode, file_pos,
1808 file_pos + num_bytes, 1805 file_pos + num_bytes, 0);
1809 &hint, 0);
1810 if (ret) 1806 if (ret)
1811 goto out; 1807 goto out;
1812 1808
@@ -3629,7 +3625,6 @@ int btrfs_cont_expand(struct inode *inode, loff_t oldsize, loff_t size)
3629 last_byte = (last_byte + mask) & ~mask; 3625 last_byte = (last_byte + mask) & ~mask;
3630 if (!test_bit(EXTENT_FLAG_PREALLOC, &em->flags)) { 3626 if (!test_bit(EXTENT_FLAG_PREALLOC, &em->flags)) {
3631 struct extent_map *hole_em; 3627 struct extent_map *hole_em;
3632 u64 hint_byte = 0;
3633 hole_size = last_byte - cur_offset; 3628 hole_size = last_byte - cur_offset;
3634 3629
3635 trans = btrfs_start_transaction(root, 3); 3630 trans = btrfs_start_transaction(root, 3);
@@ -3640,8 +3635,7 @@ int btrfs_cont_expand(struct inode *inode, loff_t oldsize, loff_t size)
3640 3635
3641 err = btrfs_drop_extents(trans, root, inode, 3636 err = btrfs_drop_extents(trans, root, inode,
3642 cur_offset, 3637 cur_offset,
3643 cur_offset + hole_size, 3638 cur_offset + hole_size, 1);
3644 &hint_byte, 1);
3645 if (err) { 3639 if (err) {
3646 btrfs_abort_transaction(trans, root, err); 3640 btrfs_abort_transaction(trans, root, err);
3647 btrfs_end_transaction(trans, root); 3641 btrfs_end_transaction(trans, root);