diff options
author | Bob Peterson <rpeterso@redhat.com> | 2012-04-11 13:01:07 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2012-04-24 11:44:30 -0400 |
commit | 29c578f567eec57b8db761d7adf6512d2d3e8efe (patch) | |
tree | 7436e303ef3729b7fcc963653ef5eb19563f1487 /fs/gfs2 | |
parent | 36f5580be1dde43eb94ce4d58bc20e493be09f09 (diff) |
GFS2: Eliminate offset parameter to gfs2_setbit
This patch eliminates a redundant parameter.
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 | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 69fa32fbf3fb..55dd010b565c 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c | |||
@@ -70,24 +70,25 @@ static u32 rgblk_search(struct gfs2_rgrpd *rgd, u32 goal, | |||
70 | 70 | ||
71 | /** | 71 | /** |
72 | * gfs2_setbit - Set a bit in the bitmaps | 72 | * gfs2_setbit - Set a bit in the bitmaps |
73 | * @buffer: the buffer that holds the bitmaps | 73 | * @rgd: the resource group descriptor |
74 | * @buflen: the length (in bytes) of the buffer | 74 | * @buf1: the primary buffer that holds the bitmaps |
75 | * @buf2: the clone buffer that holds the bitmaps | ||
76 | * @bi: the bitmap structure | ||
75 | * @block: the block to set | 77 | * @block: the block to set |
76 | * @new_state: the new state of the block | 78 | * @new_state: the new state of the block |
77 | * | 79 | * |
78 | */ | 80 | */ |
79 | 81 | ||
80 | static inline void gfs2_setbit(struct gfs2_rgrpd *rgd, unsigned char *buf1, | 82 | static inline void gfs2_setbit(struct gfs2_rgrpd *rgd, unsigned char *buf1, |
81 | unsigned char *buf2, unsigned int offset, | 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) | ||
84 | { | 85 | { |
85 | unsigned char *byte1, *byte2, *end, cur_state; | 86 | unsigned char *byte1, *byte2, *end, cur_state; |
86 | unsigned int buflen = bi->bi_len; | 87 | unsigned int buflen = bi->bi_len; |
87 | const unsigned int bit = (block % GFS2_NBBY) * GFS2_BIT_SIZE; | 88 | const unsigned int bit = (block % GFS2_NBBY) * GFS2_BIT_SIZE; |
88 | 89 | ||
89 | byte1 = buf1 + offset + (block / GFS2_NBBY); | 90 | byte1 = buf1 + bi->bi_offset + (block / GFS2_NBBY); |
90 | end = buf1 + offset + buflen; | 91 | end = buf1 + bi->bi_offset + buflen; |
91 | 92 | ||
92 | BUG_ON(byte1 >= end); | 93 | BUG_ON(byte1 >= end); |
93 | 94 | ||
@@ -110,7 +111,7 @@ static inline void gfs2_setbit(struct gfs2_rgrpd *rgd, unsigned char *buf1, | |||
110 | *byte1 ^= (cur_state ^ new_state) << bit; | 111 | *byte1 ^= (cur_state ^ new_state) << bit; |
111 | 112 | ||
112 | if (buf2) { | 113 | if (buf2) { |
113 | byte2 = buf2 + offset + (block / GFS2_NBBY); | 114 | byte2 = buf2 + bi->bi_offset + (block / GFS2_NBBY); |
114 | cur_state = (*byte2 >> bit) & GFS2_BIT_MASK; | 115 | cur_state = (*byte2 >> bit) & GFS2_BIT_MASK; |
115 | *byte2 ^= (cur_state ^ new_state) << bit; | 116 | *byte2 ^= (cur_state ^ new_state) << bit; |
116 | } | 117 | } |
@@ -1370,7 +1371,7 @@ static u64 gfs2_alloc_extent(struct gfs2_rgrpd *rgd, struct gfs2_bitmap *bi, | |||
1370 | *n = 0; | 1371 | *n = 0; |
1371 | buffer = bi->bi_bh->b_data + bi->bi_offset; | 1372 | buffer = bi->bi_bh->b_data + bi->bi_offset; |
1372 | gfs2_trans_add_bh(rgd->rd_gl, bi->bi_bh, 1); | 1373 | gfs2_trans_add_bh(rgd->rd_gl, bi->bi_bh, 1); |
1373 | gfs2_setbit(rgd, bi->bi_bh->b_data, bi->bi_clone, bi->bi_offset, | 1374 | gfs2_setbit(rgd, bi->bi_bh->b_data, bi->bi_clone, |
1374 | bi, blk, dinode ? GFS2_BLKST_DINODE : GFS2_BLKST_USED); | 1375 | bi, blk, dinode ? GFS2_BLKST_DINODE : GFS2_BLKST_USED); |
1375 | (*n)++; | 1376 | (*n)++; |
1376 | goal = blk; | 1377 | goal = blk; |
@@ -1381,7 +1382,7 @@ static u64 gfs2_alloc_extent(struct gfs2_rgrpd *rgd, struct gfs2_bitmap *bi, | |||
1381 | if (gfs2_testbit(rgd, buffer, bi->bi_len, goal) != | 1382 | if (gfs2_testbit(rgd, buffer, bi->bi_len, goal) != |
1382 | GFS2_BLKST_FREE) | 1383 | GFS2_BLKST_FREE) |
1383 | break; | 1384 | break; |
1384 | gfs2_setbit(rgd, bi->bi_bh->b_data, bi->bi_clone, bi->bi_offset, | 1385 | gfs2_setbit(rgd, bi->bi_bh->b_data, bi->bi_clone, |
1385 | bi, goal, GFS2_BLKST_USED); | 1386 | bi, goal, GFS2_BLKST_USED); |
1386 | (*n)++; | 1387 | (*n)++; |
1387 | } | 1388 | } |
@@ -1439,7 +1440,7 @@ static struct gfs2_rgrpd *rgblk_free(struct gfs2_sbd *sdp, u64 bstart, | |||
1439 | bi->bi_len); | 1440 | bi->bi_len); |
1440 | } | 1441 | } |
1441 | gfs2_trans_add_bh(rgd->rd_gl, bi->bi_bh, 1); | 1442 | gfs2_trans_add_bh(rgd->rd_gl, bi->bi_bh, 1); |
1442 | gfs2_setbit(rgd, bi->bi_bh->b_data, NULL, bi->bi_offset, | 1443 | gfs2_setbit(rgd, bi->bi_bh->b_data, NULL, |
1443 | bi, buf_blk, new_state); | 1444 | bi, buf_blk, new_state); |
1444 | } | 1445 | } |
1445 | 1446 | ||