]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: move buffer invalidation to xfs_btree_free_block
authorChristoph Hellwig <hch@lst.de>
Wed, 17 Feb 2016 06:06:02 +0000 (17:06 +1100)
committerDave Chinner <david@fromorbit.com>
Wed, 17 Feb 2016 06:06:02 +0000 (17:06 +1100)
Source kernel commit edfd9dd549212a0923c9b5b142275dc88912abfa

... instead of leaving it in the methods.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
libxfs/xfs_alloc_btree.c
libxfs/xfs_bmap_btree.c
libxfs/xfs_btree.c
libxfs/xfs_ialloc_btree.c

index 6f13572ede5a201cf0e0d1fe32da146e9ae3d4b7..79d0fb9967f030297a5a6b412ee9c7b75bf97c67 100644 (file)
@@ -116,8 +116,6 @@ xfs_allocbt_free_block(
        xfs_extent_busy_insert(cur->bc_tp, be32_to_cpu(agf->agf_seqno), bno, 1,
                              XFS_EXTENT_BUSY_SKIP_DISCARD);
        xfs_trans_agbtree_delta(cur->bc_tp, -1);
-
-       xfs_trans_binval(cur->bc_tp, bp);
        return 0;
 }
 
index 2ef18363cb510f57caedcc9210cae8f1d0d5a337..a63379bfac2990918d0e89a9675f150bd0ef5529 100644 (file)
@@ -528,7 +528,6 @@ xfs_bmbt_free_block(
 
        xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
        xfs_trans_mod_dquot_byino(tp, ip, XFS_TRANS_DQ_BCOUNT, -1L);
-       xfs_trans_binval(tp, bp);
        return 0;
 }
 
index f4a1c67195838636b44e1231c8baf133e299d301..a736cb5d09df91ccec4c583a61eac5c9eb16ab3f 100644 (file)
@@ -298,8 +298,10 @@ xfs_btree_free_block(
        int                     error;
 
        error = cur->bc_ops->free_block(cur, bp);
-       if (!error)
+       if (!error) {
+               xfs_trans_binval(cur->bc_tp, bp);
                XFS_BTREE_STATS_INC(cur, free);
+       }
        return error;
 }
 
index 52939c381df673edc5ce252b07990e64f263e179..a077635fcc0b48666949195eb8ce3f62513d961d 100644 (file)
@@ -124,16 +124,8 @@ xfs_inobt_free_block(
        struct xfs_btree_cur    *cur,
        struct xfs_buf          *bp)
 {
-       xfs_fsblock_t           fsbno;
-       int                     error;
-
-       fsbno = XFS_DADDR_TO_FSB(cur->bc_mp, XFS_BUF_ADDR(bp));
-       error = xfs_free_extent(cur->bc_tp, fsbno, 1);
-       if (error)
-               return error;
-
-       xfs_trans_binval(cur->bc_tp, bp);
-       return error;
+       return xfs_free_extent(cur->bc_tp,
+                       XFS_DADDR_TO_FSB(cur->bc_mp, XFS_BUF_ADDR(bp)), 1);
 }
 
 STATIC int