struct xfs_mount *mp,
struct xfs_bmap_intent *bi)
{
- if (xfs_ifork_is_realtime(bi->bi_owner, bi->bi_whichfork))
+ if (xfs_ifork_is_realtime(bi->bi_owner, bi->bi_whichfork)) {
+ if (xfs_has_rtgroups(mp)) {
+ xfs_rgnumber_t rgno;
+
+ rgno = xfs_rtb_to_rgno(mp, bi->bi_bmap.br_startblock);
+ bi->bi_rtg = xfs_rtgroup_get(mp, rgno);
+ } else {
+ bi->bi_rtg = NULL;
+ }
+
return;
+ }
/*
* Bump the intent count on behalf of the deferred rmap and refcount
xfs_bmap_update_put_group(
struct xfs_bmap_intent *bi)
{
- if (xfs_ifork_is_realtime(bi->bi_owner, bi->bi_whichfork))
+ if (xfs_ifork_is_realtime(bi->bi_owner, bi->bi_whichfork)) {
+ if (xfs_has_rtgroups(bi->bi_owner->i_mount))
+ xfs_rtgroup_put(bi->bi_rtg);
return;
+ }
xfs_perag_intent_put(bi->bi_pag);
}