From: Darrick J. Wong Date: Wed, 10 Aug 2016 04:52:46 +0000 (+1000) Subject: xfs: remove unnecesary lshift/rshift key initialization X-Git-Tag: v4.8.0-rc1~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae01cb8631f167f5247bc31a55e8231deeeb44b0;p=thirdparty%2Fxfsprogs-dev.git xfs: remove unnecesary lshift/rshift key initialization Source kernel commit: 1f704b2b47822435765aee16f120ae06cc40e78c 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 Reviewed-by: Brian Foster Signed-off-by: Dave Chinner --- diff --git a/libxfs/xfs_btree.c b/libxfs/xfs_btree.c index 939760c72..7a34b6580 100644 --- a/libxfs/xfs_btree.c +++ b/libxfs/xfs_btree.c @@ -2245,7 +2245,6 @@ xfs_btree_lshift( int level, int *stat) /* success/failure */ { - union xfs_btree_key key; /* btree key */ struct xfs_buf *lbp; /* left buffer pointer */ struct xfs_btree_block *left; /* left btree block */ int lrecs; /* left record count */ @@ -2388,13 +2387,6 @@ xfs_btree_lshift( xfs_btree_rec_addr(cur, 2, right), -1, rrecs); xfs_btree_log_recs(cur, rbp, 1, rrecs); - - /* - * If it's the first record in the block, we'll need a key - * structure to pass up to the next level (updkey). - */ - cur->bc_ops->init_key_from_rec(&key, - xfs_btree_rec_addr(cur, 1, right)); } /* @@ -2457,7 +2449,6 @@ xfs_btree_rshift( int level, int *stat) /* success/failure */ { - union xfs_btree_key key; /* btree key */ struct xfs_buf *lbp; /* left buffer pointer */ struct xfs_btree_block *left; /* left btree block */ struct xfs_buf *rbp; /* right buffer pointer */ @@ -2566,11 +2557,6 @@ xfs_btree_rshift( /* Now put the new data in, and log it. */ xfs_btree_copy_recs(cur, rrp, lrp, 1); xfs_btree_log_recs(cur, rbp, 1, rrecs + 1); - - cur->bc_ops->init_key_from_rec(&key, rrp); - - ASSERT(cur->bc_ops->recs_inorder(cur, rrp, - xfs_btree_rec_addr(cur, 2, right))); } /*