Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 232663
b: refs/heads/master
c: b8fc826
h: refs/heads/master
i:
  232661: 329bd7c
  232659: 19a8e12
  232655: d51c4f2
v: v3
  • Loading branch information
Dave Chinner authored and Alex Elder committed Jan 28, 2011
1 parent 7cd389a commit ea2caed
Show file tree
Hide file tree
Showing 2 changed files with 7 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: e34a314c5e49fe6b763568f6576b19f1299c33c2
refs/heads/master: b8fc82630ae289bb4e661567808afc59e3298dce
7 changes: 6 additions & 1 deletion trunk/fs/xfs/xfs_iomap.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,12 @@ xfs_iomap_prealloc_size(
int shift = 0;
int64_t freesp;

alloc_blocks = XFS_B_TO_FSB(mp, ip->i_size);
/*
* rounddown_pow_of_two() returns an undefined result
* if we pass in alloc_blocks = 0. Hence the "+ 1" to
* ensure we always pass in a non-zero value.
*/
alloc_blocks = XFS_B_TO_FSB(mp, ip->i_size) + 1;
alloc_blocks = XFS_FILEOFF_MIN(MAXEXTLEN,
rounddown_pow_of_two(alloc_blocks));

Expand Down

0 comments on commit ea2caed

Please sign in to comment.