aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2')
-rw-r--r--fs/gfs2/incore.h3
-rw-r--r--fs/gfs2/rgrp.c12
2 files changed, 7 insertions, 8 deletions
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
index c50dcdf79929..898b456b386f 100644
--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/incore.h
@@ -90,8 +90,7 @@ struct gfs2_rgrpd {
90 struct mutex rd_mutex; 90 struct mutex rd_mutex;
91 u32 rd_free_clone; 91 u32 rd_free_clone;
92 struct gfs2_log_element rd_le; 92 struct gfs2_log_element rd_le;
93 u32 rd_last_alloc_data; 93 u32 rd_last_alloc;
94 u32 rd_last_alloc_meta;
95 struct gfs2_sbd *rd_sbd; 94 struct gfs2_sbd *rd_sbd;
96 unsigned char rd_flags; 95 unsigned char rd_flags;
97#define GFS2_RDF_CHECK 0x01 /* Need to check for unlinked inodes */ 96#define GFS2_RDF_CHECK 0x01 /* Need to check for unlinked inodes */
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 66193b45e50b..cc28845ba6fd 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -1422,11 +1422,11 @@ u64 gfs2_alloc_data(struct gfs2_inode *ip)
1422 if (rgrp_contains_block(rgd, ip->i_goal)) 1422 if (rgrp_contains_block(rgd, ip->i_goal))
1423 goal = ip->i_goal - rgd->rd_data0; 1423 goal = ip->i_goal - rgd->rd_data0;
1424 else 1424 else
1425 goal = rgd->rd_last_alloc_data; 1425 goal = rgd->rd_last_alloc;
1426 1426
1427 blk = rgblk_search(rgd, goal, GFS2_BLKST_FREE, GFS2_BLKST_USED); 1427 blk = rgblk_search(rgd, goal, GFS2_BLKST_FREE, GFS2_BLKST_USED);
1428 BUG_ON(blk == BFITNOENT); 1428 BUG_ON(blk == BFITNOENT);
1429 rgd->rd_last_alloc_data = blk; 1429 rgd->rd_last_alloc = blk;
1430 1430
1431 block = rgd->rd_data0 + blk; 1431 block = rgd->rd_data0 + blk;
1432 ip->i_goal = block; 1432 ip->i_goal = block;
@@ -1467,11 +1467,11 @@ u64 gfs2_alloc_meta(struct gfs2_inode *ip)
1467 if (rgrp_contains_block(rgd, ip->i_goal)) 1467 if (rgrp_contains_block(rgd, ip->i_goal))
1468 goal = ip->i_goal - rgd->rd_data0; 1468 goal = ip->i_goal - rgd->rd_data0;
1469 else 1469 else
1470 goal = rgd->rd_last_alloc_meta; 1470 goal = rgd->rd_last_alloc;
1471 1471
1472 blk = rgblk_search(rgd, goal, GFS2_BLKST_FREE, GFS2_BLKST_USED); 1472 blk = rgblk_search(rgd, goal, GFS2_BLKST_FREE, GFS2_BLKST_USED);
1473 BUG_ON(blk == BFITNOENT); 1473 BUG_ON(blk == BFITNOENT);
1474 rgd->rd_last_alloc_meta = blk; 1474 rgd->rd_last_alloc = blk;
1475 1475
1476 block = rgd->rd_data0 + blk; 1476 block = rgd->rd_data0 + blk;
1477 ip->i_goal = block; 1477 ip->i_goal = block;
@@ -1510,11 +1510,11 @@ u64 gfs2_alloc_di(struct gfs2_inode *dip, u64 *generation)
1510 u32 blk; 1510 u32 blk;
1511 u64 block; 1511 u64 block;
1512 1512
1513 blk = rgblk_search(rgd, rgd->rd_last_alloc_meta, 1513 blk = rgblk_search(rgd, rgd->rd_last_alloc,
1514 GFS2_BLKST_FREE, GFS2_BLKST_DINODE); 1514 GFS2_BLKST_FREE, GFS2_BLKST_DINODE);
1515 BUG_ON(blk == BFITNOENT); 1515 BUG_ON(blk == BFITNOENT);
1516 1516
1517 rgd->rd_last_alloc_meta = blk; 1517 rgd->rd_last_alloc = blk;
1518 1518
1519 block = rgd->rd_data0 + blk; 1519 block = rgd->rd_data0 + blk;
1520 1520