aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/rgrp.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/rgrp.c')
-rw-r--r--fs/gfs2/rgrp.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 77eba0a38040..4291375cecc6 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -1357,16 +1357,18 @@ static u32 rgblk_search(struct gfs2_rgrpd *rgd, u32 goal,
1357 gfs2_trans_add_bh(rgd->rd_gl, bi->bi_bh, 1); 1357 gfs2_trans_add_bh(rgd->rd_gl, bi->bi_bh, 1);
1358 gfs2_setbit(rgd, bi->bi_bh->b_data, bi->bi_clone, bi->bi_offset, 1358 gfs2_setbit(rgd, bi->bi_bh->b_data, bi->bi_clone, bi->bi_offset,
1359 bi->bi_len, blk, new_state); 1359 bi->bi_len, blk, new_state);
1360 while(*n < elen) { 1360 goal = blk;
1361 while (*n < elen) {
1361 goal++; 1362 goal++;
1362 if (goal >= (bi->bi_len / GFS2_NBBY)) 1363 if (goal >= (bi->bi_len * GFS2_NBBY))
1363 break; 1364 break;
1364 if (gfs2_testbit(rgd, buffer, bi->bi_len, goal) != 1365 if (gfs2_testbit(rgd, buffer, bi->bi_len, goal) !=
1365 GFS2_BLKST_FREE) 1366 GFS2_BLKST_FREE)
1366 break; 1367 break;
1367 (*n)++;
1368 gfs2_setbit(rgd, bi->bi_bh->b_data, bi->bi_clone, 1368 gfs2_setbit(rgd, bi->bi_bh->b_data, bi->bi_clone,
1369 bi->bi_offset, bi->bi_len, blk, new_state); 1369 bi->bi_offset, bi->bi_len, goal,
1370 new_state);
1371 (*n)++;
1370 } 1372 }
1371 } 1373 }
1372 1374