[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>
This commit is contained in:
committed by
Lachlan McIlroy
parent
637aa50f46
commit
8df4da4a0a
@ -961,7 +961,7 @@ xfs_alloc_ag_vextent_near(
|
||||
args->minlen, <bnoa, <lena);
|
||||
if (ltlena >= args->minlen)
|
||||
break;
|
||||
if ((error = xfs_alloc_decrement(bno_cur_lt, 0, &i)))
|
||||
if ((error = xfs_btree_decrement(bno_cur_lt, 0, &i)))
|
||||
goto error0;
|
||||
if (!i) {
|
||||
xfs_btree_del_cursor(bno_cur_lt,
|
||||
@ -1162,7 +1162,7 @@ xfs_alloc_ag_vextent_near(
|
||||
/*
|
||||
* Fell off the left end.
|
||||
*/
|
||||
if ((error = xfs_alloc_decrement(
|
||||
if ((error = xfs_btree_decrement(
|
||||
bno_cur_lt, 0, &i)))
|
||||
goto error0;
|
||||
if (!i) {
|
||||
@ -1321,7 +1321,7 @@ xfs_alloc_ag_vextent_size(
|
||||
bestflen = flen;
|
||||
bestfbno = fbno;
|
||||
for (;;) {
|
||||
if ((error = xfs_alloc_decrement(cnt_cur, 0, &i)))
|
||||
if ((error = xfs_btree_decrement(cnt_cur, 0, &i)))
|
||||
goto error0;
|
||||
if (i == 0)
|
||||
break;
|
||||
@ -1416,7 +1416,7 @@ xfs_alloc_ag_vextent_small(
|
||||
xfs_extlen_t flen;
|
||||
int i;
|
||||
|
||||
if ((error = xfs_alloc_decrement(ccur, 0, &i)))
|
||||
if ((error = xfs_btree_decrement(ccur, 0, &i)))
|
||||
goto error0;
|
||||
if (i) {
|
||||
if ((error = xfs_alloc_get_rec(ccur, &fbno, &flen, &i)))
|
||||
@ -1607,7 +1607,7 @@ xfs_free_ag_extent(
|
||||
/*
|
||||
* Move the by-block cursor back to the left neighbor.
|
||||
*/
|
||||
if ((error = xfs_alloc_decrement(bno_cur, 0, &i)))
|
||||
if ((error = xfs_btree_decrement(bno_cur, 0, &i)))
|
||||
goto error0;
|
||||
XFS_WANT_CORRUPTED_GOTO(i == 1, error0);
|
||||
#ifdef DEBUG
|
||||
@ -1653,7 +1653,7 @@ xfs_free_ag_extent(
|
||||
* Back up the by-block cursor to the left neighbor, and
|
||||
* update its length.
|
||||
*/
|
||||
if ((error = xfs_alloc_decrement(bno_cur, 0, &i)))
|
||||
if ((error = xfs_btree_decrement(bno_cur, 0, &i)))
|
||||
goto error0;
|
||||
XFS_WANT_CORRUPTED_GOTO(i == 1, error0);
|
||||
nbno = ltbno;
|
||||
|
Reference in New Issue
Block a user