From: Andrew Price Date: Thu, 4 Feb 2016 11:20:21 +0000 Subject: [Cluster-devel] [PATCH 10/23] gfs2_edit: Don't use the global block variable in block_is_rgtree In-Reply-To: <1454584834-32412-1-git-send-email-anprice@redhat.com> References: <1454584834-32412-1-git-send-email-anprice@redhat.com> Message-ID: <1454584834-32412-11-git-send-email-anprice@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Accept it as an argument instead. Signed-off-by: Andrew Price --- gfs2/edit/extended.c | 2 +- gfs2/edit/hexedit.c | 2 +- gfs2/edit/hexedit.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gfs2/edit/extended.c b/gfs2/edit/extended.c index a8a71e7..ced2412 100644 --- a/gfs2/edit/extended.c +++ b/gfs2/edit/extended.c @@ -673,7 +673,7 @@ int display_extended(void) return -1; else if (display_indirect(indirect, indirect_blocks, 0, 0) == 0) return -1; - else if (block_is_rgtree()) { + else if (block_is_rgtree(block)) { if (sbd.gfs1) tmp_bh = bread(&sbd, sbd1->sb_rindex_di.no_addr); else diff --git a/gfs2/edit/hexedit.c b/gfs2/edit/hexedit.c index 981c02c..b4123a1 100644 --- a/gfs2/edit/hexedit.c +++ b/gfs2/edit/hexedit.c @@ -933,7 +933,7 @@ static int block_has_extended_info(void) { if (has_indirect_blocks() || block_is_rindex(block) || - block_is_rgtree() || + block_is_rgtree(block) || block_is_journals() || block_is_jindex(block) || block_is_inum_file(block) || diff --git a/gfs2/edit/hexedit.h b/gfs2/edit/hexedit.h index f1f7667..1f97631 100644 --- a/gfs2/edit/hexedit.h +++ b/gfs2/edit/hexedit.h @@ -114,9 +114,9 @@ extern enum dsp_mode dmode; /* special case meant to parse the rindex and follow the */ /* blocks to the real rgs. */ /* ------------------------------------------------------------------------ */ -static inline int block_is_rgtree(void) +static inline int block_is_rgtree(uint64_t blk) { - if (block == RGLIST_DUMMY_BLOCK) + if (blk == RGLIST_DUMMY_BLOCK) return TRUE; return FALSE; } -- 2.4.3