Gitweb:
http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=66b2ef17...
Commit: 66b2ef1733727a7fed601392f025d706e9b0e620
Parent: 3e0b661752347602cfbcd7efcb07d3fab052ee4c
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Wed Feb 3 15:16:57 2016 +0000
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Wed Feb 3 15:16:57 2016 +0000
gfs2_edit: Don't use the global block variable in block_is_rgtree
Accept it as an argument instead.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
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;
}