]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: in btree_lshift, only allocate temporary cursor when needed
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 10 Aug 2016 04:53:46 +0000 (14:53 +1000)
committerDave Chinner <david@fromorbit.com>
Wed, 10 Aug 2016 04:53:46 +0000 (14:53 +1000)
commite6358021b9f14e67d1ec5a781173312e1f1329e9
tree8984f192f51691f492c8643b662046f8a7e8fec7
parentae01cb8631f167f5247bc31a55e8231deeeb44b0
xfs: in btree_lshift, only allocate temporary cursor when needed

Source kernel commit: c1d22ae89cf6086d6a457b3b9241fcb36ebddd14

We only need the temporary cursor in _btree_lshift if we're shifting
in an overlapped btree.  Therefore, factor that into a single block
of code so we avoid unnecessary cursor duplication.

Also fix use of the wrong cursor when checking for corruption in
xfs_btree_rshift().

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
libxfs/xfs_btree.c