Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360998
b: refs/heads/master
c: 9bf7a48
h: refs/heads/master
v: v3
  • Loading branch information
Josef Bacik committed Mar 4, 2013
1 parent 40625db commit 647f9bc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 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: 154ea2893002618bc3f9a1e2d8186c65490968b1
refs/heads/master: 9bf7a4890518186238d2579be16ecc5190a707c0
6 changes: 2 additions & 4 deletions trunk/fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -8502,7 +8502,6 @@ static int __btrfs_prealloc_file_range(struct inode *inode, int mode,
struct btrfs_key ins;
u64 cur_offset = start;
u64 i_size;
u64 cur_bytes;
int ret = 0;
bool own_trans = true;

Expand All @@ -8517,9 +8516,8 @@ static int __btrfs_prealloc_file_range(struct inode *inode, int mode,
}
}

cur_bytes = min(num_bytes, 256ULL * 1024 * 1024);
cur_bytes = max(cur_bytes, min_size);
ret = btrfs_reserve_extent(trans, root, cur_bytes,
ret = btrfs_reserve_extent(trans, root,
min(num_bytes, 256ULL * 1024 * 1024),
min_size, 0, *alloc_hint, &ins, 1);
if (ret) {
if (own_trans)
Expand Down
5 changes: 4 additions & 1 deletion trunk/fs/btrfs/tree-log.c
Original file line number Diff line number Diff line change
Expand Up @@ -1382,7 +1382,10 @@ static noinline int link_to_fixup_dir(struct btrfs_trans_handle *trans,

btrfs_release_path(path);
if (ret == 0) {
btrfs_inc_nlink(inode);
if (!inode->i_nlink)
set_nlink(inode, 1);
else
btrfs_inc_nlink(inode);
ret = btrfs_update_inode(trans, root, inode);
} else if (ret == -EEXIST) {
ret = 0;
Expand Down

0 comments on commit 647f9bc

Please sign in to comment.