diff options
author | Bob Peterson <rpeterso@redhat.com> | 2012-04-26 12:44:35 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2012-04-27 05:46:07 -0400 |
commit | 06344b9186e0d9520cb1b032728aba9f6ee55b91 (patch) | |
tree | d044143e9b6ed30c484c400bb18cbe31e7a51370 /fs/gfs2 | |
parent | 144a4c2ff75552e2aabb9256ca0ec5e277097153 (diff) |
GFS2: Eliminate needless parameter from function gfs2_setbit
This patch eliminates parameter "buf1" from function gfs2_setbit.
This is possible because it was always passed in as bi->bi_bh->b_data.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r-- | fs/gfs2/rgrp.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index b550e5c1e797..645c16fcc252 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c | |||
@@ -71,7 +71,6 @@ static u32 rgblk_search(struct gfs2_rgrpd *rgd, u32 goal, | |||
71 | /** | 71 | /** |
72 | * gfs2_setbit - Set a bit in the bitmaps | 72 | * gfs2_setbit - Set a bit in the bitmaps |
73 | * @rgd: the resource group descriptor | 73 | * @rgd: the resource group descriptor |
74 | * @buf1: the primary buffer that holds the bitmaps | ||
75 | * @buf2: the clone buffer that holds the bitmaps | 74 | * @buf2: the clone buffer that holds the bitmaps |
76 | * @bi: the bitmap structure | 75 | * @bi: the bitmap structure |
77 | * @block: the block to set | 76 | * @block: the block to set |
@@ -79,16 +78,16 @@ static u32 rgblk_search(struct gfs2_rgrpd *rgd, u32 goal, | |||
79 | * | 78 | * |
80 | */ | 79 | */ |
81 | 80 | ||
82 | static inline void gfs2_setbit(struct gfs2_rgrpd *rgd, unsigned char *buf1, | 81 | static inline void gfs2_setbit(struct gfs2_rgrpd *rgd, unsigned char *buf2, |
83 | unsigned char *buf2, struct gfs2_bitmap *bi, | 82 | struct gfs2_bitmap *bi, u32 block, |
84 | u32 block, unsigned char new_state) | 83 | unsigned char new_state) |
85 | { | 84 | { |
86 | unsigned char *byte1, *byte2, *end, cur_state; | 85 | unsigned char *byte1, *byte2, *end, cur_state; |
87 | unsigned int buflen = bi->bi_len; | 86 | unsigned int buflen = bi->bi_len; |
88 | const unsigned int bit = (block % GFS2_NBBY) * GFS2_BIT_SIZE; | 87 | const unsigned int bit = (block % GFS2_NBBY) * GFS2_BIT_SIZE; |
89 | 88 | ||
90 | byte1 = buf1 + bi->bi_offset + (block / GFS2_NBBY); | 89 | byte1 = bi->bi_bh->b_data + bi->bi_offset + (block / GFS2_NBBY); |
91 | end = buf1 + bi->bi_offset + buflen; | 90 | end = bi->bi_bh->b_data + bi->bi_offset + buflen; |
92 | 91 | ||
93 | BUG_ON(byte1 >= end); | 92 | BUG_ON(byte1 >= end); |
94 | 93 | ||
@@ -1369,8 +1368,8 @@ static u64 gfs2_alloc_extent(struct gfs2_rgrpd *rgd, struct gfs2_bitmap *bi, | |||
1369 | *n = 0; | 1368 | *n = 0; |
1370 | buffer = bi->bi_bh->b_data + bi->bi_offset; | 1369 | buffer = bi->bi_bh->b_data + bi->bi_offset; |
1371 | gfs2_trans_add_bh(rgd->rd_gl, bi->bi_bh, 1); | 1370 | gfs2_trans_add_bh(rgd->rd_gl, bi->bi_bh, 1); |
1372 | gfs2_setbit(rgd, bi->bi_bh->b_data, bi->bi_clone, | 1371 | gfs2_setbit(rgd, bi->bi_clone, bi, blk, |
1373 | bi, blk, dinode ? GFS2_BLKST_DINODE : GFS2_BLKST_USED); | 1372 | dinode ? GFS2_BLKST_DINODE : GFS2_BLKST_USED); |
1374 | (*n)++; | 1373 | (*n)++; |
1375 | goal = blk; | 1374 | goal = blk; |
1376 | while (*n < elen) { | 1375 | while (*n < elen) { |
@@ -1380,8 +1379,7 @@ static u64 gfs2_alloc_extent(struct gfs2_rgrpd *rgd, struct gfs2_bitmap *bi, | |||
1380 | if (gfs2_testbit(rgd, buffer, bi->bi_len, goal) != | 1379 | if (gfs2_testbit(rgd, buffer, bi->bi_len, goal) != |
1381 | GFS2_BLKST_FREE) | 1380 | GFS2_BLKST_FREE) |
1382 | break; | 1381 | break; |
1383 | gfs2_setbit(rgd, bi->bi_bh->b_data, bi->bi_clone, | 1382 | gfs2_setbit(rgd, bi->bi_clone, bi, goal, GFS2_BLKST_USED); |
1384 | bi, goal, GFS2_BLKST_USED); | ||
1385 | (*n)++; | 1383 | (*n)++; |
1386 | } | 1384 | } |
1387 | blk = gfs2_bi2rgd_blk(bi, blk); | 1385 | blk = gfs2_bi2rgd_blk(bi, blk); |
@@ -1438,8 +1436,7 @@ static struct gfs2_rgrpd *rgblk_free(struct gfs2_sbd *sdp, u64 bstart, | |||
1438 | bi->bi_len); | 1436 | bi->bi_len); |
1439 | } | 1437 | } |
1440 | gfs2_trans_add_bh(rgd->rd_gl, bi->bi_bh, 1); | 1438 | gfs2_trans_add_bh(rgd->rd_gl, bi->bi_bh, 1); |
1441 | gfs2_setbit(rgd, bi->bi_bh->b_data, NULL, | 1439 | gfs2_setbit(rgd, NULL, bi, buf_blk, new_state); |
1442 | bi, buf_blk, new_state); | ||
1443 | } | 1440 | } |
1444 | 1441 | ||
1445 | return rgd; | 1442 | return rgd; |