Skip to content

Commit

Permalink
xfs: always defer agfl block frees
Browse files Browse the repository at this point in the history
The AGFL fixup code conditionally defers block frees from the free
list based on whether the current transaction has an associated
xfs_defer_ops structure. Now that dfops is embedded in the
transaction and the internal dfops is used unconditionally, this
invariant is always true.

Remove the now dead logic to check for ->t_dfops in
xfs_alloc_fix_freelist() and unconditionally defer AGFL block frees.

Signed-off-by: Brian Foster <[email protected]>
Reviewed-by: Darrick J. Wong <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Darrick J. Wong <[email protected]>
  • Loading branch information
Brian Foster authored and djwong committed Aug 3, 2018
1 parent 0f37d17 commit c03edc9
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions fs/xfs/libxfs/xfs_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2323,15 +2323,8 @@ xfs_alloc_fix_freelist(
if (error)
goto out_agbp_relse;

/* defer agfl frees if dfops is provided */
if (tp->t_dfops) {
xfs_defer_agfl_block(tp, args->agno, bno, &targs.oinfo);
} else {
error = xfs_free_agfl_block(tp, args->agno, bno, agbp,
&targs.oinfo);
if (error)
goto out_agbp_relse;
}
/* defer agfl frees */
xfs_defer_agfl_block(tp, args->agno, bno, &targs.oinfo);
}

targs.tp = tp;
Expand Down

0 comments on commit c03edc9

Please sign in to comment.