Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 276745
b: refs/heads/master
c: 3642320
h: refs/heads/master
i:
  276743: 30079ea
v: v3
  • Loading branch information
Miao Xie authored and Chris Mason committed Dec 15, 2011
1 parent 8fd246b commit bf95451
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 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: f4a2f4c548296168832ad4ab7e7f7b0cd0bf1214
refs/heads/master: 3642320e07444cc46327b24977d752f99706dac2
5 changes: 4 additions & 1 deletion trunk/fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -3327,7 +3327,7 @@ int btrfs_cont_expand(struct inode *inode, loff_t oldsize, loff_t size)
u64 hint_byte = 0;
hole_size = last_byte - cur_offset;

trans = btrfs_start_transaction(root, 2);
trans = btrfs_start_transaction(root, 3);
if (IS_ERR(trans)) {
err = PTR_ERR(trans);
break;
Expand All @@ -3337,6 +3337,7 @@ int btrfs_cont_expand(struct inode *inode, loff_t oldsize, loff_t size)
cur_offset + hole_size,
&hint_byte, 1);
if (err) {
btrfs_update_inode(trans, root, inode);
btrfs_end_transaction(trans, root);
break;
}
Expand All @@ -3346,13 +3347,15 @@ int btrfs_cont_expand(struct inode *inode, loff_t oldsize, loff_t size)
0, hole_size, 0, hole_size,
0, 0, 0);
if (err) {
btrfs_update_inode(trans, root, inode);
btrfs_end_transaction(trans, root);
break;
}

btrfs_drop_extent_cache(inode, hole_start,
last_byte - 1, 0);

btrfs_update_inode(trans, root, inode);
btrfs_end_transaction(trans, root);
}
free_extent_map(em);
Expand Down

0 comments on commit bf95451

Please sign in to comment.