Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 361008
b: refs/heads/master
c: 2cc65e3
h: refs/heads/master
v: v3
  • Loading branch information
Chris Mason committed Mar 7, 2013
1 parent a7d0154 commit 8b555ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 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: 9b53157aac7366cea413ee29b629f83225829e87
refs/heads/master: 2cc65e3e57d636a159d92945655b1574e47dba63
6 changes: 4 additions & 2 deletions trunk/fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -8502,6 +8502,7 @@ 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 @@ -8516,8 +8517,9 @@ static int __btrfs_prealloc_file_range(struct inode *inode, int mode,
}
}

ret = btrfs_reserve_extent(trans, root,
min(num_bytes, 256ULL * 1024 * 1024),
cur_bytes = min(num_bytes, 256ULL * 1024 * 1024);
cur_bytes = max(cur_bytes, min_size);
ret = btrfs_reserve_extent(trans, root, cur_bytes,
min_size, 0, *alloc_hint, &ins, 1);
if (ret) {
if (own_trans)
Expand Down

0 comments on commit 8b555ae

Please sign in to comment.