Skip to content

Commit edfd9dd

Browse files
Christoph Hellwigdchinner
authored andcommitted
xfs: move buffer invalidation to xfs_btree_free_block
... instead of leaving it in the methods. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Brian Foster <[email protected]> Signed-off-by: Dave Chinner <[email protected]>
1 parent c46ee8a commit edfd9dd

File tree

4 files changed

+5
-14
lines changed

4 files changed

+5
-14
lines changed

fs/xfs/libxfs/xfs_alloc_btree.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,6 @@ xfs_allocbt_free_block(
118118
xfs_extent_busy_insert(cur->bc_tp, be32_to_cpu(agf->agf_seqno), bno, 1,
119119
XFS_EXTENT_BUSY_SKIP_DISCARD);
120120
xfs_trans_agbtree_delta(cur->bc_tp, -1);
121-
122-
xfs_trans_binval(cur->bc_tp, bp);
123121
return 0;
124122
}
125123

fs/xfs/libxfs/xfs_bmap_btree.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,6 @@ xfs_bmbt_free_block(
531531

532532
xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
533533
xfs_trans_mod_dquot_byino(tp, ip, XFS_TRANS_DQ_BCOUNT, -1L);
534-
xfs_trans_binval(tp, bp);
535534
return 0;
536535
}
537536

fs/xfs/libxfs/xfs_btree.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,10 @@ xfs_btree_free_block(
302302
int error;
303303

304304
error = cur->bc_ops->free_block(cur, bp);
305-
if (!error)
305+
if (!error) {
306+
xfs_trans_binval(cur->bc_tp, bp);
306307
XFS_BTREE_STATS_INC(cur, free);
308+
}
307309
return error;
308310
}
309311

fs/xfs/libxfs/xfs_ialloc_btree.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -125,16 +125,8 @@ xfs_inobt_free_block(
125125
struct xfs_btree_cur *cur,
126126
struct xfs_buf *bp)
127127
{
128-
xfs_fsblock_t fsbno;
129-
int error;
130-
131-
fsbno = XFS_DADDR_TO_FSB(cur->bc_mp, XFS_BUF_ADDR(bp));
132-
error = xfs_free_extent(cur->bc_tp, fsbno, 1);
133-
if (error)
134-
return error;
135-
136-
xfs_trans_binval(cur->bc_tp, bp);
137-
return error;
128+
return xfs_free_extent(cur->bc_tp,
129+
XFS_DADDR_TO_FSB(cur->bc_mp, XFS_BUF_ADDR(bp)), 1);
138130
}
139131

140132
STATIC int

0 commit comments

Comments
 (0)