From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bob Peterson Date: Mon, 30 Jul 2018 16:06:01 -0400 (EDT) Subject: [Cluster-devel] [PATCH 1/3] gfs2: Don't depend on mp_aheight in clone_metapath In-Reply-To: <20180730123353.15815-1-agruenba@redhat.com> References: <20180730123353.15815-1-agruenba@redhat.com> Message-ID: <1203799916.55813140.1532981161695.JavaMail.zimbra@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit ----- Original Message ----- > Signed-off-by: Andreas Gruenbacher > --- > fs/gfs2/bmap.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c > index 03128ed1f34e..a564cf0b7221 100644 > --- a/fs/gfs2/bmap.c > +++ b/fs/gfs2/bmap.c > @@ -294,8 +294,11 @@ static void clone_metapath(struct metapath *clone, > struct metapath *mp) > unsigned int hgt; > > *clone = *mp; > - for (hgt = 0; hgt < mp->mp_aheight; hgt++) > + for (hgt = 0; hgt < GFS2_MAX_META_HEIGHT; hgt++) { > + if (mp->mp_bh[hgt] == NULL) > + break; > get_bh(clone->mp_bh[hgt]); > + } > } > > static void gfs2_metapath_ra(struct gfs2_glock *gl, __be64 *start, __be64 > *end) > -- > 2.17.1 > > Hi, Reviewed-by: Bob Peterson Bob Peterson