cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH 1/3] gfs2: Don't depend on mp_aheight in clone_metapath
@ 2018-07-30 12:33 Andreas Gruenbacher
  2018-07-30 12:33 ` [Cluster-devel] [PATCH 2/3] gfs2: Split gfs2_indirect_init Andreas Gruenbacher
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Andreas Gruenbacher @ 2018-07-30 12:33 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
---
 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



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-07-30 20:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-30 12:33 [Cluster-devel] [PATCH 1/3] gfs2: Don't depend on mp_aheight in clone_metapath Andreas Gruenbacher
2018-07-30 12:33 ` [Cluster-devel] [PATCH 2/3] gfs2: Split gfs2_indirect_init Andreas Gruenbacher
2018-07-30 20:06   ` Bob Peterson
2018-07-30 12:33 ` [Cluster-devel] [PATCH 3/3] gfs2: Don't create unnecessary indirect blocks Andreas Gruenbacher
2018-07-30 20:12   ` Bob Peterson
2018-07-30 14:29 ` [Cluster-devel] [PATCH 1/3] gfs2: Don't depend on mp_aheight in clone_metapath Andreas Gruenbacher
2018-07-30 20:06 ` Bob Peterson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).