In gfs2_walk_metadata, always reset mp->mp_list when decreasing the current height. Otherwise, gfs2_walk_metadata can end up skipping metadata.
Signed-off-by: Andreas Gruenbacher <[email protected]> --- fs/gfs2/bmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 327efee82060..9fe1793ebf6f 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@ -485,6 +485,7 @@ static int gfs2_walk_metadata(struct inode *inode, sector_t lblock, } brelse(mp->mp_bh[hgt]); mp->mp_bh[hgt] = NULL; + mp->mp_list[hgt] = 0; if (!hgt) break; hgt--; @@ -495,7 +496,6 @@ static int gfs2_walk_metadata(struct inode *inode, sector_t lblock, start = metapointer(hgt, mp); end = metaend(hgt, mp); if (start >= end) { - mp->mp_list[hgt] = 0; if (!hgt) break; goto lower_metapath; -- 2.20.1
