Loading fs/xfs/xfs_extfree_item.c +25 −10 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ #include "xfs_inode.h" #include "xfs_rtbitmap.h" #include "xfs_rtgroup.h" #include "xfs_zone_alloc.h" struct kmem_cache *xfs_efi_cache; struct kmem_cache *xfs_efd_cache; Loading Loading @@ -767,21 +768,35 @@ xfs_rtextent_free_finish_item( trace_xfs_extent_free_deferred(mp, xefi); if (!(xefi->xefi_flags & XFS_EFI_CANCELLED)) { if (xefi->xefi_flags & XFS_EFI_CANCELLED) goto done; if (*rtgp != to_rtg(xefi->xefi_group)) { unsigned int lock_flags; if (xfs_has_zoned(mp)) lock_flags = XFS_RTGLOCK_RMAP; else lock_flags = XFS_RTGLOCK_BITMAP; *rtgp = to_rtg(xefi->xefi_group); xfs_rtgroup_lock(*rtgp, XFS_RTGLOCK_BITMAP); xfs_rtgroup_trans_join(tp, *rtgp, XFS_RTGLOCK_BITMAP); xfs_rtgroup_lock(*rtgp, lock_flags); xfs_rtgroup_trans_join(tp, *rtgp, lock_flags); } error = xfs_rtfree_blocks(tp, *rtgp, xefi->xefi_startblock, xefi->xefi_blockcount); if (xfs_has_zoned(mp)) { error = xfs_zone_free_blocks(tp, *rtgp, xefi->xefi_startblock, xefi->xefi_blockcount); } else { error = xfs_rtfree_blocks(tp, *rtgp, xefi->xefi_startblock, xefi->xefi_blockcount); } if (error == -EAGAIN) { xfs_efd_from_efi(efdp); return error; } done: xfs_efd_add_extent(efdp, xefi); xfs_extent_free_cancel_item(item); return error; Loading Loading
fs/xfs/xfs_extfree_item.c +25 −10 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ #include "xfs_inode.h" #include "xfs_rtbitmap.h" #include "xfs_rtgroup.h" #include "xfs_zone_alloc.h" struct kmem_cache *xfs_efi_cache; struct kmem_cache *xfs_efd_cache; Loading Loading @@ -767,21 +768,35 @@ xfs_rtextent_free_finish_item( trace_xfs_extent_free_deferred(mp, xefi); if (!(xefi->xefi_flags & XFS_EFI_CANCELLED)) { if (xefi->xefi_flags & XFS_EFI_CANCELLED) goto done; if (*rtgp != to_rtg(xefi->xefi_group)) { unsigned int lock_flags; if (xfs_has_zoned(mp)) lock_flags = XFS_RTGLOCK_RMAP; else lock_flags = XFS_RTGLOCK_BITMAP; *rtgp = to_rtg(xefi->xefi_group); xfs_rtgroup_lock(*rtgp, XFS_RTGLOCK_BITMAP); xfs_rtgroup_trans_join(tp, *rtgp, XFS_RTGLOCK_BITMAP); xfs_rtgroup_lock(*rtgp, lock_flags); xfs_rtgroup_trans_join(tp, *rtgp, lock_flags); } error = xfs_rtfree_blocks(tp, *rtgp, xefi->xefi_startblock, xefi->xefi_blockcount); if (xfs_has_zoned(mp)) { error = xfs_zone_free_blocks(tp, *rtgp, xefi->xefi_startblock, xefi->xefi_blockcount); } else { error = xfs_rtfree_blocks(tp, *rtgp, xefi->xefi_startblock, xefi->xefi_blockcount); } if (error == -EAGAIN) { xfs_efd_from_efi(efdp); return error; } done: xfs_efd_add_extent(efdp, xefi); xfs_extent_free_cancel_item(item); return error; Loading