X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=fs%2Fext3%2Fballoc.c;h=ca8aee6efe3720aefc617d9d8c8c1e9b49359359;hb=6ed911fb04886c5510a41cd89203b931b1c5d261;hp=5a2c198762f082af99ad37e3ac7a19f58a1cbee7;hpb=2823b5535efad71e950ef50c2ce5f9e4dbaedc17;p=linux-2.6 diff --git a/fs/ext3/balloc.c b/fs/ext3/balloc.c index 5a2c198762..ca8aee6efe 100644 --- a/fs/ext3/balloc.c +++ b/fs/ext3/balloc.c @@ -32,7 +32,7 @@ * The file system contains group descriptors which are located after the * super block. Each descriptor contains the number of the bitmap block and * the free blocks count in the block. The descriptors are loaded in memory - * when a file system is mounted (see ext3_read_super). + * when a file system is mounted (see ext3_fill_super). */ @@ -730,7 +730,7 @@ find_next_usable_block(ext3_grpblk_t start, struct buffer_head *bh, here = 0; p = ((char *)bh->b_data) + (here >> 3); - r = memscan(p, 0, (maxblocks - here + 7) >> 3); + r = memscan(p, 0, ((maxblocks + 7) >> 3) - (here >> 3)); next = (r - ((char *)bh->b_data)) << 3; if (next < maxblocks && next >= start && ext3_test_allocatable(next, bh))