]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
xfs: always defer agfl block frees
authorBrian Foster <bfoster@redhat.com>
Wed, 1 Aug 2018 14:20:35 +0000 (07:20 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Fri, 3 Aug 2018 06:05:14 +0000 (23:05 -0700)
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 <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/libxfs/xfs_alloc.c

index 5580b6e23bb33d4dc9c1d87a9059bf4233144c09..e1c0c0d2f1b05dc3a1b6fb908294ee1db788caea 100644 (file)
@@ -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;