aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext3
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext3')
-rw-r--r--fs/ext3/balloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext3/balloc.c b/fs/ext3/balloc.c
index 5a2c198762f0..22161740ba29 100644
--- a/fs/ext3/balloc.c
+++ b/fs/ext3/balloc.c
@@ -730,7 +730,7 @@ find_next_usable_block(ext3_grpblk_t start, struct buffer_head *bh,
730 here = 0; 730 here = 0;
731 731
732 p = ((char *)bh->b_data) + (here >> 3); 732 p = ((char *)bh->b_data) + (here >> 3);
733 r = memscan(p, 0, (maxblocks - here + 7) >> 3); 733 r = memscan(p, 0, ((maxblocks + 7) >> 3) - (here >> 3));
734 next = (r - ((char *)bh->b_data)) << 3; 734 next = (r - ((char *)bh->b_data)) << 3;
735 735
736 if (next < maxblocks && next >= start && ext3_test_allocatable(next, bh)) 736 if (next < maxblocks && next >= start && ext3_test_allocatable(next, bh))