diff options
author | Christoph Hellwig <hch@lst.de> | 2016-02-07 22:58:07 -0500 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2016-02-07 22:58:07 -0500 |
commit | edfd9dd549212a0923c9b5b142275dc88912abfa (patch) | |
tree | 8d096dd78a94b1f4594afcbefec9d187de060923 | |
parent | c46ee8ad7856b58eeb383c30ce847897f85c4103 (diff) |
xfs: move buffer invalidation to xfs_btree_free_block
... 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>
-rw-r--r-- | fs/xfs/libxfs/xfs_alloc_btree.c | 2 | ||||
-rw-r--r-- | fs/xfs/libxfs/xfs_bmap_btree.c | 1 | ||||
-rw-r--r-- | fs/xfs/libxfs/xfs_btree.c | 4 | ||||
-rw-r--r-- | fs/xfs/libxfs/xfs_ialloc_btree.c | 12 |
4 files changed, 5 insertions, 14 deletions
diff --git a/fs/xfs/libxfs/xfs_alloc_btree.c b/fs/xfs/libxfs/xfs_alloc_btree.c index 444626ddbd1b..d9b42425291e 100644 --- a/fs/xfs/libxfs/xfs_alloc_btree.c +++ b/fs/xfs/libxfs/xfs_alloc_btree.c | |||
@@ -118,8 +118,6 @@ xfs_allocbt_free_block( | |||
118 | xfs_extent_busy_insert(cur->bc_tp, be32_to_cpu(agf->agf_seqno), bno, 1, | 118 | xfs_extent_busy_insert(cur->bc_tp, be32_to_cpu(agf->agf_seqno), bno, 1, |
119 | XFS_EXTENT_BUSY_SKIP_DISCARD); | 119 | XFS_EXTENT_BUSY_SKIP_DISCARD); |
120 | xfs_trans_agbtree_delta(cur->bc_tp, -1); | 120 | xfs_trans_agbtree_delta(cur->bc_tp, -1); |
121 | |||
122 | xfs_trans_binval(cur->bc_tp, bp); | ||
123 | return 0; | 121 | return 0; |
124 | } | 122 | } |
125 | 123 | ||
diff --git a/fs/xfs/libxfs/xfs_bmap_btree.c b/fs/xfs/libxfs/xfs_bmap_btree.c index 1637c37bfbaa..e37508ae589b 100644 --- a/fs/xfs/libxfs/xfs_bmap_btree.c +++ b/fs/xfs/libxfs/xfs_bmap_btree.c | |||
@@ -531,7 +531,6 @@ xfs_bmbt_free_block( | |||
531 | 531 | ||
532 | xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); | 532 | xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); |
533 | xfs_trans_mod_dquot_byino(tp, ip, XFS_TRANS_DQ_BCOUNT, -1L); | 533 | xfs_trans_mod_dquot_byino(tp, ip, XFS_TRANS_DQ_BCOUNT, -1L); |
534 | xfs_trans_binval(tp, bp); | ||
535 | return 0; | 534 | return 0; |
536 | } | 535 | } |
537 | 536 | ||
diff --git a/fs/xfs/libxfs/xfs_btree.c b/fs/xfs/libxfs/xfs_btree.c index 77afb4a899b9..1f88e1ce770f 100644 --- a/fs/xfs/libxfs/xfs_btree.c +++ b/fs/xfs/libxfs/xfs_btree.c | |||
@@ -302,8 +302,10 @@ xfs_btree_free_block( | |||
302 | int error; | 302 | int error; |
303 | 303 | ||
304 | error = cur->bc_ops->free_block(cur, bp); | 304 | error = cur->bc_ops->free_block(cur, bp); |
305 | if (!error) | 305 | if (!error) { |
306 | xfs_trans_binval(cur->bc_tp, bp); | ||
306 | XFS_BTREE_STATS_INC(cur, free); | 307 | XFS_BTREE_STATS_INC(cur, free); |
308 | } | ||
307 | return error; | 309 | return error; |
308 | } | 310 | } |
309 | 311 | ||
diff --git a/fs/xfs/libxfs/xfs_ialloc_btree.c b/fs/xfs/libxfs/xfs_ialloc_btree.c index c679f3c05b63..89c21d771e35 100644 --- a/fs/xfs/libxfs/xfs_ialloc_btree.c +++ b/fs/xfs/libxfs/xfs_ialloc_btree.c | |||
@@ -125,16 +125,8 @@ xfs_inobt_free_block( | |||
125 | struct xfs_btree_cur *cur, | 125 | struct xfs_btree_cur *cur, |
126 | struct xfs_buf *bp) | 126 | struct xfs_buf *bp) |
127 | { | 127 | { |
128 | xfs_fsblock_t fsbno; | 128 | return xfs_free_extent(cur->bc_tp, |
129 | int error; | 129 | XFS_DADDR_TO_FSB(cur->bc_mp, XFS_BUF_ADDR(bp)), 1); |
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; | ||
138 | } | 130 | } |
139 | 131 | ||
140 | STATIC int | 132 | STATIC int |