XArray: Fix splitting to non-zero orders
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Thu, 19 Nov 2020 13:32:31 +0000 (08:32 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Apr 2021 09:43:21 +0000 (11:43 +0200)
commitd99e22c0ea747d6a5b1a06e0787d3643e452c9d0
tree8066fb430fa46c529321b3c42b4ad73ff3c1f135
parent9576dd89554e39f1c6dcb377ff2a961269d2eaac
XArray: Fix splitting to non-zero orders

[ Upstream commit 3012110d71f41410932924e1d188f9eb57f1f824 ]

Splitting an order-4 entry into order-2 entries would leave the array
containing pointers to 000040008000c000 instead of 000044448888cccc.
This is a one-character fix, but enhance the test suite to check this
case.

Reported-by: Zi Yan <ziy@nvidia.com>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
lib/test_xarray.c
lib/xarray.c