Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262225
b: refs/heads/master
c: 0eb0e19
h: refs/heads/master
i:
  262223: 6c2068a
v: v3
  • Loading branch information
Mark Fasheh committed Jul 14, 2011
1 parent df3a588 commit 9a3ce8b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 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: 1e5063d093b5f024ae35bf835ca07463de2c1a1f
refs/heads/master: 0eb0e19cde6f01397ef8c0e094e44beb75c62a1e
9 changes: 5 additions & 4 deletions trunk/fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -3172,6 +3172,11 @@ int btrfs_truncate_inode_items(struct btrfs_trans_handle *trans,

BUG_ON(new_size > 0 && min_type != BTRFS_EXTENT_DATA_KEY);

path = btrfs_alloc_path();
if (!path)
return -ENOMEM;
path->reada = -1;

if (root->ref_cows || root == root->fs_info->tree_root)
btrfs_drop_extent_cache(inode, new_size & (~mask), (u64)-1, 0);

Expand All @@ -3184,10 +3189,6 @@ int btrfs_truncate_inode_items(struct btrfs_trans_handle *trans,
if (min_type == 0 && root == BTRFS_I(inode)->root)
btrfs_kill_delayed_inode_items(inode);

path = btrfs_alloc_path();
BUG_ON(!path);
path->reada = -1;

key.objectid = ino;
key.offset = (u64)-1;
key.type = (u8)-1;
Expand Down

0 comments on commit 9a3ce8b

Please sign in to comment.