xfs
[Top] [All Lists]

[PATCH 05/19] xfs: remove unused level arg from xfs_btree_read_buf_block

To: xfs@xxxxxxxxxxx
Subject: [PATCH 05/19] xfs: remove unused level arg from xfs_btree_read_buf_block()
From: Eric Sandeen <sandeen@xxxxxxxxxx>
Date: Mon, 7 Apr 2014 14:58:52 -0500
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1396900746-22201-1-git-send-email-sandeen@xxxxxxxxxx>
References: <1396900746-22201-1-git-send-email-sandeen@xxxxxxxxxx>
Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---
 fs/xfs/xfs_btree.c |   32 +++++++++++++-------------------
 1 files changed, 13 insertions(+), 19 deletions(-)

diff --git a/fs/xfs/xfs_btree.c b/fs/xfs/xfs_btree.c
index 9adaae4..e20d61b 100644
--- a/fs/xfs/xfs_btree.c
+++ b/fs/xfs/xfs_btree.c
@@ -1161,7 +1161,6 @@ STATIC int
 xfs_btree_read_buf_block(
        struct xfs_btree_cur    *cur,
        union xfs_btree_ptr     *ptr,
-       int                     level,
        int                     flags,
        struct xfs_btree_block  **block,
        struct xfs_buf          **bpp)
@@ -1519,8 +1518,8 @@ xfs_btree_increment(
                union xfs_btree_ptr     *ptrp;
 
                ptrp = xfs_btree_ptr_addr(cur, cur->bc_ptrs[lev], block);
-               error = xfs_btree_read_buf_block(cur, ptrp, --lev,
-                                                       0, &block, &bp);
+               --lev;
+               error = xfs_btree_read_buf_block(cur, ptrp, 0, &block, &bp);
                if (error)
                        goto error0;
 
@@ -1618,8 +1617,8 @@ xfs_btree_decrement(
                union xfs_btree_ptr     *ptrp;
 
                ptrp = xfs_btree_ptr_addr(cur, cur->bc_ptrs[lev], block);
-               error = xfs_btree_read_buf_block(cur, ptrp, --lev,
-                                                       0, &block, &bp);
+               --lev;
+               error = xfs_btree_read_buf_block(cur, ptrp, 0, &block, &bp);
                if (error)
                        goto error0;
                xfs_btree_setbuf(cur, lev, bp);
@@ -1669,7 +1668,7 @@ xfs_btree_lookup_get_block(
                return 0;
        }
 
-       error = xfs_btree_read_buf_block(cur, pp, level, 0, blkp, &bp);
+       error = xfs_btree_read_buf_block(cur, pp, 0, blkp, &bp);
        if (error)
                return error;
 
@@ -2020,7 +2019,7 @@ xfs_btree_lshift(
                goto out0;
 
        /* Set up the left neighbor as "left". */
-       error = xfs_btree_read_buf_block(cur, &lptr, level, 0, &left, &lbp);
+       error = xfs_btree_read_buf_block(cur, &lptr, 0, &left, &lbp);
        if (error)
                goto error0;
 
@@ -2204,7 +2203,7 @@ xfs_btree_rshift(
                goto out0;
 
        /* Set up the right neighbor as "right". */
-       error = xfs_btree_read_buf_block(cur, &rptr, level, 0, &right, &rbp);
+       error = xfs_btree_read_buf_block(cur, &rptr, 0, &right, &rbp);
        if (error)
                goto error0;
 
@@ -2472,7 +2471,7 @@ xfs_btree_split(
         * point back to right instead of to left.
         */
        if (!xfs_btree_ptr_is_null(cur, &rrptr)) {
-               error = xfs_btree_read_buf_block(cur, &rrptr, level,
+               error = xfs_btree_read_buf_block(cur, &rrptr,
                                                        0, &rrblock, &rrbp);
                if (error)
                        goto error0;
@@ -2686,8 +2685,7 @@ xfs_btree_new_root(
                lbp = bp;
                xfs_btree_buf_to_ptr(cur, lbp, &lptr);
                left = block;
-               error = xfs_btree_read_buf_block(cur, &rptr,
-                                       cur->bc_nlevels - 1, 0, &right, &rbp);
+               error = xfs_btree_read_buf_block(cur, &rptr, 0, &right, &rbp);
                if (error)
                        goto error0;
                bp = rbp;
@@ -2698,8 +2696,7 @@ xfs_btree_new_root(
                xfs_btree_buf_to_ptr(cur, rbp, &rptr);
                right = block;
                xfs_btree_get_sibling(cur, right, &lptr, XFS_BB_LEFTSIB);
-               error = xfs_btree_read_buf_block(cur, &lptr,
-                                       cur->bc_nlevels - 1, 0, &left, &lbp);
+               error = xfs_btree_read_buf_block(cur, &lptr, 0, &left, &lbp);
                if (error)
                        goto error0;
                bp = lbp;
@@ -3651,8 +3648,7 @@ xfs_btree_delrec(
                rptr = cptr;
                right = block;
                rbp = bp;
-               error = xfs_btree_read_buf_block(cur, &lptr, level,
-                                                       0, &left, &lbp);
+               error = xfs_btree_read_buf_block(cur, &lptr, 0, &left, &lbp);
                if (error)
                        goto error0;
 
@@ -3669,8 +3665,7 @@ xfs_btree_delrec(
                lptr = cptr;
                left = block;
                lbp = bp;
-               error = xfs_btree_read_buf_block(cur, &rptr, level,
-                                                       0, &right, &rbp);
+               error = xfs_btree_read_buf_block(cur, &rptr, 0, &right, &rbp);
                if (error)
                        goto error0;
 
@@ -3742,8 +3737,7 @@ xfs_btree_delrec(
        /* If there is a right sibling, point it to the remaining block. */
        xfs_btree_get_sibling(cur, left, &cptr, XFS_BB_RIGHTSIB);
        if (!xfs_btree_ptr_is_null(cur, &cptr)) {
-               error = xfs_btree_read_buf_block(cur, &cptr, level,
-                                                       0, &rrblock, &rrbp);
+               error = xfs_btree_read_buf_block(cur, &cptr, 0, &rrblock, 
&rrbp);
                if (error)
                        goto error0;
                xfs_btree_set_sibling(cur, rrblock, &lptr, XFS_BB_LEFTSIB);
-- 
1.7.1

<Prev in Thread] Current Thread [Next in Thread>