aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 0aa24717cd5..609f3bbbd1e 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -319,8 +319,6 @@ static noinline int compress_file_range(struct inode *inode,
319 struct btrfs_root *root = BTRFS_I(inode)->root; 319 struct btrfs_root *root = BTRFS_I(inode)->root;
320 struct btrfs_trans_handle *trans; 320 struct btrfs_trans_handle *trans;
321 u64 num_bytes; 321 u64 num_bytes;
322 u64 orig_start;
323 u64 disk_num_bytes;
324 u64 blocksize = root->sectorsize; 322 u64 blocksize = root->sectorsize;
325 u64 actual_end; 323 u64 actual_end;
326 u64 isize = i_size_read(inode); 324 u64 isize = i_size_read(inode);
@@ -335,8 +333,6 @@ static noinline int compress_file_range(struct inode *inode,
335 int i; 333 int i;
336 int will_compress; 334 int will_compress;
337 335
338 orig_start = start;
339
340 actual_end = min_t(u64, isize, end + 1); 336 actual_end = min_t(u64, isize, end + 1);
341again: 337again:
342 will_compress = 0; 338 will_compress = 0;
@@ -371,7 +367,6 @@ again:
371 total_compressed = min(total_compressed, max_uncompressed); 367 total_compressed = min(total_compressed, max_uncompressed);
372 num_bytes = (end - start + blocksize) & ~(blocksize - 1); 368 num_bytes = (end - start + blocksize) & ~(blocksize - 1);
373 num_bytes = max(blocksize, num_bytes); 369 num_bytes = max(blocksize, num_bytes);
374 disk_num_bytes = num_bytes;
375 total_in = 0; 370 total_in = 0;
376 ret = 0; 371 ret = 0;
377 372
@@ -467,7 +462,6 @@ again:
467 if (total_compressed >= total_in) { 462 if (total_compressed >= total_in) {
468 will_compress = 0; 463 will_compress = 0;
469 } else { 464 } else {
470 disk_num_bytes = total_compressed;
471 num_bytes = total_in; 465 num_bytes = total_in;
472 } 466 }
473 } 467 }
@@ -757,8 +751,6 @@ static noinline int cow_file_range(struct inode *inode,
757 u64 disk_num_bytes; 751 u64 disk_num_bytes;
758 u64 cur_alloc_size; 752 u64 cur_alloc_size;
759 u64 blocksize = root->sectorsize; 753 u64 blocksize = root->sectorsize;
760 u64 actual_end;
761 u64 isize = i_size_read(inode);
762 struct btrfs_key ins; 754 struct btrfs_key ins;
763 struct extent_map *em; 755 struct extent_map *em;
764 struct extent_map_tree *em_tree = &BTRFS_I(inode)->extent_tree; 756 struct extent_map_tree *em_tree = &BTRFS_I(inode)->extent_tree;
@@ -770,8 +762,6 @@ static noinline int cow_file_range(struct inode *inode,
770 btrfs_set_trans_block_group(trans, inode); 762 btrfs_set_trans_block_group(trans, inode);
771 trans->block_rsv = &root->fs_info->delalloc_block_rsv; 763 trans->block_rsv = &root->fs_info->delalloc_block_rsv;
772 764
773 actual_end = min_t(u64, isize, end + 1);
774
775 num_bytes = (end - start + blocksize) & ~(blocksize - 1); 765 num_bytes = (end - start + blocksize) & ~(blocksize - 1);
776 num_bytes = max(blocksize, num_bytes); 766 num_bytes = max(blocksize, num_bytes);
777 disk_num_bytes = num_bytes; 767 disk_num_bytes = num_bytes;
@@ -2274,7 +2264,6 @@ void btrfs_orphan_cleanup(struct btrfs_root *root)
2274{ 2264{
2275 struct btrfs_path *path; 2265 struct btrfs_path *path;
2276 struct extent_buffer *leaf; 2266 struct extent_buffer *leaf;
2277 struct btrfs_item *item;
2278 struct btrfs_key key, found_key; 2267 struct btrfs_key key, found_key;
2279 struct btrfs_trans_handle *trans; 2268 struct btrfs_trans_handle *trans;
2280 struct inode *inode; 2269 struct inode *inode;
@@ -2312,7 +2301,6 @@ void btrfs_orphan_cleanup(struct btrfs_root *root)
2312 2301
2313 /* pull out the item */ 2302 /* pull out the item */
2314 leaf = path->nodes[0]; 2303 leaf = path->nodes[0];
2315 item = btrfs_item_nr(leaf, path->slots[0]);
2316 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); 2304 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]);
2317 2305
2318 /* make sure the item matches what we want */ 2306 /* make sure the item matches what we want */
@@ -5701,7 +5689,6 @@ static void btrfs_submit_direct(int rw, struct bio *bio, struct inode *inode,
5701 struct btrfs_root *root = BTRFS_I(inode)->root; 5689 struct btrfs_root *root = BTRFS_I(inode)->root;
5702 struct btrfs_dio_private *dip; 5690 struct btrfs_dio_private *dip;
5703 struct bio_vec *bvec = bio->bi_io_vec; 5691 struct bio_vec *bvec = bio->bi_io_vec;
5704 u64 start;
5705 int skip_sum; 5692 int skip_sum;
5706 int write = rw & REQ_WRITE; 5693 int write = rw & REQ_WRITE;
5707 int ret = 0; 5694 int ret = 0;
@@ -5727,7 +5714,6 @@ static void btrfs_submit_direct(int rw, struct bio *bio, struct inode *inode,
5727 dip->inode = inode; 5714 dip->inode = inode;
5728 dip->logical_offset = file_offset; 5715 dip->logical_offset = file_offset;
5729 5716
5730 start = dip->logical_offset;
5731 dip->bytes = 0; 5717 dip->bytes = 0;
5732 do { 5718 do {
5733 dip->bytes += bvec->bv_len; 5719 dip->bytes += bvec->bv_len;