summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_extfree_item.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_extfree_item.c')
-rw-r--r--fs/xfs/xfs_extfree_item.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/xfs/xfs_extfree_item.c b/fs/xfs/xfs_extfree_item.c
index 011b50469301..c1aae07467c9 100644
--- a/fs/xfs/xfs_extfree_item.c
+++ b/fs/xfs/xfs_extfree_item.c
@@ -350,6 +350,7 @@ xfs_trans_free_extent(
struct xfs_owner_info oinfo = { };
struct xfs_mount *mp = tp->t_mountp;
struct xfs_extent *extp;
+ struct xfs_perag *pag;
uint next_extent;
xfs_agnumber_t agno = XFS_FSB_TO_AGNO(mp,
xefi->xefi_startblock);
@@ -366,9 +367,12 @@ xfs_trans_free_extent(
trace_xfs_bmap_free_deferred(tp->t_mountp, agno, 0, agbno,
xefi->xefi_blockcount);
- error = __xfs_free_extent(tp, xefi->xefi_startblock,
- xefi->xefi_blockcount, &oinfo, XFS_AG_RESV_NONE,
+ pag = xfs_perag_get(mp, agno);
+ error = __xfs_free_extent(tp, pag, agbno, xefi->xefi_blockcount,
+ &oinfo, XFS_AG_RESV_NONE,
xefi->xefi_flags & XFS_EFI_SKIP_DISCARD);
+ xfs_perag_put(pag);
+
/*
* Mark the transaction dirty, even on error. This ensures the
* transaction is aborted, which: