From: Andrew Price Date: Thu, 6 Aug 2020 14:37:41 +0100 Subject: [Cluster-devel] [PATCH 06/32] libgfs2: Remove gfs2_buffer_head from gfs_dinode_in() In-Reply-To: <20200806133807.111280-1-anprice@redhat.com> References: <20200806133807.111280-1-anprice@redhat.com> Message-ID: <20200806133807.111280-7-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 Signed-off-by: Andrew Price --- gfs2/edit/hexedit.h | 1 - gfs2/libgfs2/gfs1.c | 11 ++++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/gfs2/edit/hexedit.h b/gfs2/edit/hexedit.h index d2992d8e..ab2d44d6 100644 --- a/gfs2/edit/hexedit.h +++ b/gfs2/edit/hexedit.h @@ -227,7 +227,6 @@ extern void gfs_jindex_in(struct gfs_jindex *jindex, char *buf); extern void gfs_log_header_in(struct gfs_log_header *head, struct gfs2_buffer_head *bh); extern void gfs_log_header_print(struct gfs_log_header *lh); -extern void gfs_dinode_in(struct gfs_dinode *di, struct gfs2_buffer_head *bh); extern void savemeta(char *out_fn, int saveoption, int gziplevel); extern void restoremeta(const char *in_fn, const char *out_device, uint64_t printblocksonly); diff --git a/gfs2/libgfs2/gfs1.c b/gfs2/libgfs2/gfs1.c index 16c183b5..7da23168 100644 --- a/gfs2/libgfs2/gfs1.c +++ b/gfs2/libgfs2/gfs1.c @@ -248,14 +248,11 @@ int gfs1_writei(struct gfs2_inode *ip, char *buf, uint64_t offset, return copied; } -/* ------------------------------------------------------------------------ */ -/* gfs_dinode_in */ -/* ------------------------------------------------------------------------ */ -static void gfs_dinode_in(struct gfs_dinode *di, struct gfs2_buffer_head *bh) +static void gfs_dinode_in(struct gfs_dinode *di, char *buf) { - struct gfs_dinode *str = (struct gfs_dinode *)bh->b_data; + struct gfs_dinode *str = (struct gfs_dinode *)buf; - gfs2_meta_header_in(&di->di_header, bh->b_data); + gfs2_meta_header_in(&di->di_header, buf); gfs2_inum_in(&di->di_num, (char *)&str->di_num); di->di_mode = be32_to_cpu(str->di_mode); @@ -297,7 +294,7 @@ static struct gfs2_inode *__gfs_inode_get(struct gfs2_sbd *sdp, bh = bread(sdp, di_addr); ip->bh_owned = 1; } - gfs_dinode_in(&gfs1_dinode, bh); + gfs_dinode_in(&gfs1_dinode, bh->b_data); memcpy(&ip->i_di.di_header, &gfs1_dinode.di_header, sizeof(struct gfs2_meta_header)); memcpy(&ip->i_di.di_num, &gfs1_dinode.di_num, -- 2.26.2