Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 286007
b: refs/heads/master
c: f70a9a6
h: refs/heads/master
i:
  286005: 08c93e5
  286003: 829080f
  285999: d298ef5
v: v3
  • Loading branch information
Miao Xie authored and Chris Mason committed Jan 16, 2012
1 parent 2ea087c commit 7b4f143
Show file tree
Hide file tree
Showing 2 changed files with 2 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: 7ad85bb76a61801362701b77c5cee5aa09f35369
refs/heads/master: f70a9a6b94af86fca069a7552ab672c31b457786
8 changes: 1 addition & 7 deletions trunk/fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -3009,7 +3009,6 @@ int btrfs_truncate_inode_items(struct btrfs_trans_handle *trans,
int pending_del_nr = 0;
int pending_del_slot = 0;
int extent_type = -1;
int encoding;
int ret;
int err = 0;
u64 ino = btrfs_ino(inode);
Expand Down Expand Up @@ -3059,7 +3058,6 @@ int btrfs_truncate_inode_items(struct btrfs_trans_handle *trans,
leaf = path->nodes[0];
btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]);
found_type = btrfs_key_type(&found_key);
encoding = 0;

if (found_key.objectid != ino)
break;
Expand All @@ -3072,10 +3070,6 @@ int btrfs_truncate_inode_items(struct btrfs_trans_handle *trans,
fi = btrfs_item_ptr(leaf, path->slots[0],
struct btrfs_file_extent_item);
extent_type = btrfs_file_extent_type(leaf, fi);
encoding = btrfs_file_extent_compression(leaf, fi);
encoding |= btrfs_file_extent_encryption(leaf, fi);
encoding |= btrfs_file_extent_other_encoding(leaf, fi);

if (extent_type != BTRFS_FILE_EXTENT_INLINE) {
item_end +=
btrfs_file_extent_num_bytes(leaf, fi);
Expand Down Expand Up @@ -3103,7 +3097,7 @@ int btrfs_truncate_inode_items(struct btrfs_trans_handle *trans,
if (extent_type != BTRFS_FILE_EXTENT_INLINE) {
u64 num_dec;
extent_start = btrfs_file_extent_disk_bytenr(leaf, fi);
if (!del_item && !encoding) {
if (!del_item) {
u64 orig_num_bytes =
btrfs_file_extent_num_bytes(leaf, fi);
extent_num_bytes = new_size -
Expand Down

0 comments on commit 7b4f143

Please sign in to comment.