summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_discard.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_discard.c')
-rw-r--r--fs/xfs/xfs_discard.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/xfs/xfs_discard.c b/fs/xfs/xfs_discard.c
index 739ec69c4428..019371c865d2 100644
--- a/fs/xfs/xfs_discard.c
+++ b/fs/xfs/xfs_discard.c
@@ -117,10 +117,12 @@ xfs_discard_extents(
blk_start_plug(&plug);
list_for_each_entry(busyp, &extents->extent_list, list) {
- trace_xfs_discard_extent(busyp->pag, busyp->bno, busyp->length);
+ struct xfs_perag *pag = to_perag(busyp->group);
+
+ trace_xfs_discard_extent(pag, busyp->bno, busyp->length);
error = __blkdev_issue_discard(mp->m_ddev_targp->bt_bdev,
- xfs_agbno_to_daddr(busyp->pag, busyp->bno),
+ xfs_agbno_to_daddr(pag, busyp->bno),
XFS_FSB_TO_BB(mp, busyp->length),
GFP_KERNEL, &bio);
if (error && error != -EOPNOTSUPP) {
@@ -271,12 +273,12 @@ xfs_trim_gather_extents(
* If any blocks in the range are still busy, skip the
* discard and try again the next time.
*/
- if (xfs_extent_busy_search(pag, fbno, flen)) {
+ if (xfs_extent_busy_search(pag_group(pag), fbno, flen)) {
trace_xfs_discard_busy(pag, fbno, flen);
goto next_extent;
}
- xfs_extent_busy_insert_discard(pag, fbno, flen,
+ xfs_extent_busy_insert_discard(pag_group(pag), fbno, flen,
&extents->extent_list);
next_extent:
if (tcur->by_bno)