projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6dbe51c
)
xfs: fix potential infinite loop in xfs_iomap_prealloc_size()
author
Brian Foster
<
[email protected]
>
Fri, 22 Feb 2013 18:32:56 +0000
(13:32 -0500)
committer
Ben Myers
<
[email protected]
>
Mon, 18 Mar 2013 18:30:38 +0000
(13:30 -0500)
If freesp == 0, we could end up in an infinite loop while squashing
the preallocation. Break the loop when we've killed the prealloc
entirely.
Signed-off-by: Brian Foster <
[email protected]
>
Reviewed-by: Dave Chinner <
[email protected]
>
Signed-off-by: Ben Myers <
[email protected]
>
(cherry picked from commit
e78c420bfc2608bb5f9a0b9165b1071c1e31166a
)
fs/xfs/xfs_iomap.c
patch
|
blob
|
history
diff --git
a/fs/xfs/xfs_iomap.c
b/fs/xfs/xfs_iomap.c
index 912d83d8860a984a938b604f3e2447c3e390ce89..b0b0f448e8434a08ccaf6fc4f75b9b23a2ad6c51 100644
(file)
--- a/
fs/xfs/xfs_iomap.c
+++ b/
fs/xfs/xfs_iomap.c
@@
-413,7
+413,7
@@
xfs_iomap_prealloc_size(
* have a large file on a small filesystem and the above
* lowspace thresholds are smaller than MAXEXTLEN.
*/
- while (alloc_blocks >= freesp)
+ while (alloc_blocks
&& alloc_blocks
>= freesp)
alloc_blocks >>= 4;
}