From: Andrew Price Date: Thu, 4 Feb 2016 11:20:22 +0000 Subject: [Cluster-devel] [PATCH 11/23] gfs2_edit: Don't use the global block variable in block_is_journals 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-12-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 ced2412..7a517bf 100644 --- a/gfs2/edit/extended.c +++ b/gfs2/edit/extended.c @@ -662,7 +662,7 @@ int display_extended(void) parse_rindex(tmp_inode, TRUE); inode_put(&tmp_inode); brelse(tmp_bh); - } else if (block_is_journals()) { + } else if (block_is_journals(block)) { if (sbd.gfs1) block = sbd1->sb_jindex_di.no_addr; else diff --git a/gfs2/edit/hexedit.c b/gfs2/edit/hexedit.c index b4123a1..12deb13 100644 --- a/gfs2/edit/hexedit.c +++ b/gfs2/edit/hexedit.c @@ -934,7 +934,7 @@ static int block_has_extended_info(void) if (has_indirect_blocks() || block_is_rindex(block) || block_is_rgtree(block) || - block_is_journals() || + block_is_journals(block) || block_is_jindex(block) || block_is_inum_file(block) || block_is_statfs_file(block) || diff --git a/gfs2/edit/hexedit.h b/gfs2/edit/hexedit.h index 1f97631..ab4b41b 100644 --- a/gfs2/edit/hexedit.h +++ b/gfs2/edit/hexedit.h @@ -121,9 +121,9 @@ static inline int block_is_rgtree(uint64_t blk) return FALSE; } -static inline int block_is_journals(void) +static inline int block_is_journals(uint64_t blk) { - if (block == JOURNALS_DUMMY_BLOCK) + if (blk == JOURNALS_DUMMY_BLOCK) return TRUE; return FALSE; } -- 2.4.3