Commit edfd9dd5 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Dave Chinner

xfs: move buffer invalidation to xfs_btree_free_block

... instead of leaving it in the methods.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
parent c46ee8ad
...@@ -118,8 +118,6 @@ xfs_allocbt_free_block( ...@@ -118,8 +118,6 @@ xfs_allocbt_free_block(
xfs_extent_busy_insert(cur->bc_tp, be32_to_cpu(agf->agf_seqno), bno, 1, xfs_extent_busy_insert(cur->bc_tp, be32_to_cpu(agf->agf_seqno), bno, 1,
XFS_EXTENT_BUSY_SKIP_DISCARD); XFS_EXTENT_BUSY_SKIP_DISCARD);
xfs_trans_agbtree_delta(cur->bc_tp, -1); xfs_trans_agbtree_delta(cur->bc_tp, -1);
xfs_trans_binval(cur->bc_tp, bp);
return 0; return 0;
} }
......
...@@ -531,7 +531,6 @@ xfs_bmbt_free_block( ...@@ -531,7 +531,6 @@ xfs_bmbt_free_block(
xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
xfs_trans_mod_dquot_byino(tp, ip, XFS_TRANS_DQ_BCOUNT, -1L); xfs_trans_mod_dquot_byino(tp, ip, XFS_TRANS_DQ_BCOUNT, -1L);
xfs_trans_binval(tp, bp);
return 0; return 0;
} }
......
...@@ -302,8 +302,10 @@ xfs_btree_free_block( ...@@ -302,8 +302,10 @@ xfs_btree_free_block(
int error; int error;
error = cur->bc_ops->free_block(cur, bp); 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); XFS_BTREE_STATS_INC(cur, free);
}
return error; return error;
} }
......
...@@ -125,16 +125,8 @@ xfs_inobt_free_block( ...@@ -125,16 +125,8 @@ xfs_inobt_free_block(
struct xfs_btree_cur *cur, struct xfs_btree_cur *cur,
struct xfs_buf *bp) struct xfs_buf *bp)
{ {
xfs_fsblock_t fsbno; return xfs_free_extent(cur->bc_tp,
int error; XFS_DADDR_TO_FSB(cur->bc_mp, XFS_BUF_ADDR(bp)), 1);
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;
} }
STATIC int STATIC int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment