aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_alloc.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2008-10-30 01:55:58 -0400
committerLachlan McIlroy <lachlan@sgi.com>2008-10-30 01:55:58 -0400
commit8df4da4a0a642d3a016028c0d922bcb4d5a4a6d7 (patch)
tree29b07230f8269ef12a10665d757a6e935c4e2e49 /fs/xfs/xfs_alloc.c
parent637aa50f461b8ea6b1e8bf9877b0d13d00085043 (diff)
[XFS] implement generic xfs_btree_decrement
From: Dave Chinner <dgc@sgi.com> [hch: split out from bigger patch and minor adaptions] SGI-PV: 985583 SGI-Modid: xfs-linux-melb:xfs-kern:32191a Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com> Signed-off-by: Bill O'Donnell <billodo@sgi.com> Signed-off-by: David Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_alloc.c')
-rw-r--r--fs/xfs/xfs_alloc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/xfs/xfs_alloc.c b/fs/xfs/xfs_alloc.c
index b8bb694b7da..7ca6903e235 100644
--- a/fs/xfs/xfs_alloc.c
+++ b/fs/xfs/xfs_alloc.c
@@ -961,7 +961,7 @@ xfs_alloc_ag_vextent_near(
961 args->minlen, &ltbnoa, &ltlena); 961 args->minlen, &ltbnoa, &ltlena);
962 if (ltlena >= args->minlen) 962 if (ltlena >= args->minlen)
963 break; 963 break;
964 if ((error = xfs_alloc_decrement(bno_cur_lt, 0, &i))) 964 if ((error = xfs_btree_decrement(bno_cur_lt, 0, &i)))
965 goto error0; 965 goto error0;
966 if (!i) { 966 if (!i) {
967 xfs_btree_del_cursor(bno_cur_lt, 967 xfs_btree_del_cursor(bno_cur_lt,
@@ -1162,7 +1162,7 @@ xfs_alloc_ag_vextent_near(
1162 /* 1162 /*
1163 * Fell off the left end. 1163 * Fell off the left end.
1164 */ 1164 */
1165 if ((error = xfs_alloc_decrement( 1165 if ((error = xfs_btree_decrement(
1166 bno_cur_lt, 0, &i))) 1166 bno_cur_lt, 0, &i)))
1167 goto error0; 1167 goto error0;
1168 if (!i) { 1168 if (!i) {
@@ -1321,7 +1321,7 @@ xfs_alloc_ag_vextent_size(
1321 bestflen = flen; 1321 bestflen = flen;
1322 bestfbno = fbno; 1322 bestfbno = fbno;
1323 for (;;) { 1323 for (;;) {
1324 if ((error = xfs_alloc_decrement(cnt_cur, 0, &i))) 1324 if ((error = xfs_btree_decrement(cnt_cur, 0, &i)))
1325 goto error0; 1325 goto error0;
1326 if (i == 0) 1326 if (i == 0)
1327 break; 1327 break;
@@ -1416,7 +1416,7 @@ xfs_alloc_ag_vextent_small(
1416 xfs_extlen_t flen; 1416 xfs_extlen_t flen;
1417 int i; 1417 int i;
1418 1418
1419 if ((error = xfs_alloc_decrement(ccur, 0, &i))) 1419 if ((error = xfs_btree_decrement(ccur, 0, &i)))
1420 goto error0; 1420 goto error0;
1421 if (i) { 1421 if (i) {
1422 if ((error = xfs_alloc_get_rec(ccur, &fbno, &flen, &i))) 1422 if ((error = xfs_alloc_get_rec(ccur, &fbno, &flen, &i)))
@@ -1607,7 +1607,7 @@ xfs_free_ag_extent(
1607 /* 1607 /*
1608 * Move the by-block cursor back to the left neighbor. 1608 * Move the by-block cursor back to the left neighbor.
1609 */ 1609 */
1610 if ((error = xfs_alloc_decrement(bno_cur, 0, &i))) 1610 if ((error = xfs_btree_decrement(bno_cur, 0, &i)))
1611 goto error0; 1611 goto error0;
1612 XFS_WANT_CORRUPTED_GOTO(i == 1, error0); 1612 XFS_WANT_CORRUPTED_GOTO(i == 1, error0);
1613#ifdef DEBUG 1613#ifdef DEBUG
@@ -1653,7 +1653,7 @@ xfs_free_ag_extent(
1653 * Back up the by-block cursor to the left neighbor, and 1653 * Back up the by-block cursor to the left neighbor, and
1654 * update its length. 1654 * update its length.
1655 */ 1655 */
1656 if ((error = xfs_alloc_decrement(bno_cur, 0, &i))) 1656 if ((error = xfs_btree_decrement(bno_cur, 0, &i)))
1657 goto error0; 1657 goto error0;
1658 XFS_WANT_CORRUPTED_GOTO(i == 1, error0); 1658 XFS_WANT_CORRUPTED_GOTO(i == 1, error0);
1659 nbno = ltbno; 1659 nbno = ltbno;