Skip to content

Commit 92099f0

Browse files
author
Andreas Gruenbacher
committed
gfs2: Add metapath_dibh helper
Add a metapath_dibh() helper for extracting the inode's buffer head from a metapath. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
1 parent 1f7b0a8 commit 92099f0

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

fs/gfs2/bmap.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,12 @@ static void gfs2_metapath_ra(struct gfs2_glock *gl, __be64 *start, __be64 *end)
317317
}
318318
}
319319

320+
static inline struct buffer_head *
321+
metapath_dibh(struct metapath *mp)
322+
{
323+
return mp->mp_bh[0];
324+
}
325+
320326
static int __fillup_metapath(struct gfs2_inode *ip, struct metapath *mp,
321327
unsigned int x, unsigned int h)
322328
{
@@ -659,7 +665,7 @@ static int __gfs2_iomap_alloc(struct inode *inode, struct iomap *iomap,
659665
{
660666
struct gfs2_inode *ip = GFS2_I(inode);
661667
struct gfs2_sbd *sdp = GFS2_SB(inode);
662-
struct buffer_head *dibh = mp->mp_bh[0];
668+
struct buffer_head *dibh = metapath_dibh(mp);
663669
u64 bn;
664670
unsigned n, i, blks, alloced = 0, iblks = 0, branch_start = 0;
665671
size_t dblks = iomap->length >> inode->i_blkbits;

0 commit comments

Comments
 (0)