aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2016-08-02 22:22:45 -0400
committerDave Chinner <david@fromorbit.com>2016-08-02 22:22:45 -0400
commit1f704b2b47822435765aee16f120ae06cc40e78c (patch)
treee8e229b112ee3125e0c9c4833f0944829cc501f3 /fs/xfs
parent973b83194bf12f7e315aace57ae2096ff7b82360 (diff)
xfs: remove unnecesary lshift/rshift key initialization
In the lshift/rshift functions we don't use the key variable for anything now, so remove the variable and its initializer. The update_keys functions figure out the key for a block on their own. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/libxfs/xfs_btree.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/fs/xfs/libxfs/xfs_btree.c b/fs/xfs/libxfs/xfs_btree.c
index 2a13d418ed4b..40c19f82190c 100644
--- a/fs/xfs/libxfs/xfs_btree.c
+++ b/fs/xfs/libxfs/xfs_btree.c
@@ -2249,7 +2249,6 @@ xfs_btree_lshift(
2249 int level, 2249 int level,
2250 int *stat) /* success/failure */ 2250 int *stat) /* success/failure */
2251{ 2251{
2252 union xfs_btree_key key; /* btree key */
2253 struct xfs_buf *lbp; /* left buffer pointer */ 2252 struct xfs_buf *lbp; /* left buffer pointer */
2254 struct xfs_btree_block *left; /* left btree block */ 2253 struct xfs_btree_block *left; /* left btree block */
2255 int lrecs; /* left record count */ 2254 int lrecs; /* left record count */
@@ -2392,13 +2391,6 @@ xfs_btree_lshift(
2392 xfs_btree_rec_addr(cur, 2, right), 2391 xfs_btree_rec_addr(cur, 2, right),
2393 -1, rrecs); 2392 -1, rrecs);
2394 xfs_btree_log_recs(cur, rbp, 1, rrecs); 2393 xfs_btree_log_recs(cur, rbp, 1, rrecs);
2395
2396 /*
2397 * If it's the first record in the block, we'll need a key
2398 * structure to pass up to the next level (updkey).
2399 */
2400 cur->bc_ops->init_key_from_rec(&key,
2401 xfs_btree_rec_addr(cur, 1, right));
2402 } 2394 }
2403 2395
2404 /* 2396 /*
@@ -2461,7 +2453,6 @@ xfs_btree_rshift(
2461 int level, 2453 int level,
2462 int *stat) /* success/failure */ 2454 int *stat) /* success/failure */
2463{ 2455{
2464 union xfs_btree_key key; /* btree key */
2465 struct xfs_buf *lbp; /* left buffer pointer */ 2456 struct xfs_buf *lbp; /* left buffer pointer */
2466 struct xfs_btree_block *left; /* left btree block */ 2457 struct xfs_btree_block *left; /* left btree block */
2467 struct xfs_buf *rbp; /* right buffer pointer */ 2458 struct xfs_buf *rbp; /* right buffer pointer */
@@ -2570,11 +2561,6 @@ xfs_btree_rshift(
2570 /* Now put the new data in, and log it. */ 2561 /* Now put the new data in, and log it. */
2571 xfs_btree_copy_recs(cur, rrp, lrp, 1); 2562 xfs_btree_copy_recs(cur, rrp, lrp, 1);
2572 xfs_btree_log_recs(cur, rbp, 1, rrecs + 1); 2563 xfs_btree_log_recs(cur, rbp, 1, rrecs + 1);
2573
2574 cur->bc_ops->init_key_from_rec(&key, rrp);
2575
2576 ASSERT(cur->bc_ops->recs_inorder(cur, rrp,
2577 xfs_btree_rec_addr(cur, 2, right)));
2578 } 2564 }
2579 2565
2580 /* 2566 /*