diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2016-09-01 12:33:46 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2016-09-01 12:33:46 -0400 |
commit | 0cb7bf61b1e9f05027de58c80f9b46a714d24e35 (patch) | |
tree | 41fb55cf62d07b425122f9a8b96412c0d8eb99c5 /fs/xfs/libxfs/xfs_rmap_btree.c | |
parent | aa877175e7a9982233ed8f10cb4bfddd78d82741 (diff) | |
parent | 3eab887a55424fc2c27553b7bfe32330df83f7b8 (diff) |
Merge branch 'linus' into smp/hotplug
Apply upstream changes to avoid conflicts with pending patches.
Diffstat (limited to 'fs/xfs/libxfs/xfs_rmap_btree.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_rmap_btree.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_rmap_btree.c b/fs/xfs/libxfs/xfs_rmap_btree.c index bc1faebc84ec..17b8eeb34ac8 100644 --- a/fs/xfs/libxfs/xfs_rmap_btree.c +++ b/fs/xfs/libxfs/xfs_rmap_btree.c | |||
@@ -98,6 +98,8 @@ xfs_rmapbt_alloc_block( | |||
98 | union xfs_btree_ptr *new, | 98 | union xfs_btree_ptr *new, |
99 | int *stat) | 99 | int *stat) |
100 | { | 100 | { |
101 | struct xfs_buf *agbp = cur->bc_private.a.agbp; | ||
102 | struct xfs_agf *agf = XFS_BUF_TO_AGF(agbp); | ||
101 | int error; | 103 | int error; |
102 | xfs_agblock_t bno; | 104 | xfs_agblock_t bno; |
103 | 105 | ||
@@ -124,6 +126,8 @@ xfs_rmapbt_alloc_block( | |||
124 | 126 | ||
125 | xfs_trans_agbtree_delta(cur->bc_tp, 1); | 127 | xfs_trans_agbtree_delta(cur->bc_tp, 1); |
126 | new->s = cpu_to_be32(bno); | 128 | new->s = cpu_to_be32(bno); |
129 | be32_add_cpu(&agf->agf_rmap_blocks, 1); | ||
130 | xfs_alloc_log_agf(cur->bc_tp, agbp, XFS_AGF_RMAP_BLOCKS); | ||
127 | 131 | ||
128 | XFS_BTREE_TRACE_CURSOR(cur, XBT_EXIT); | 132 | XFS_BTREE_TRACE_CURSOR(cur, XBT_EXIT); |
129 | *stat = 1; | 133 | *stat = 1; |
@@ -143,6 +147,8 @@ xfs_rmapbt_free_block( | |||
143 | bno = xfs_daddr_to_agbno(cur->bc_mp, XFS_BUF_ADDR(bp)); | 147 | bno = xfs_daddr_to_agbno(cur->bc_mp, XFS_BUF_ADDR(bp)); |
144 | trace_xfs_rmapbt_free_block(cur->bc_mp, cur->bc_private.a.agno, | 148 | trace_xfs_rmapbt_free_block(cur->bc_mp, cur->bc_private.a.agno, |
145 | bno, 1); | 149 | bno, 1); |
150 | be32_add_cpu(&agf->agf_rmap_blocks, -1); | ||
151 | xfs_alloc_log_agf(cur->bc_tp, agbp, XFS_AGF_RMAP_BLOCKS); | ||
146 | error = xfs_alloc_put_freelist(cur->bc_tp, agbp, NULL, bno, 1); | 152 | error = xfs_alloc_put_freelist(cur->bc_tp, agbp, NULL, bno, 1); |
147 | if (error) | 153 | if (error) |
148 | return error; | 154 | return error; |