XArray: Fix xa_erase of 2-byte aligned entries
authorMatthew Wilcox <willy@infradead.org>
Thu, 21 Feb 2019 22:36:45 +0000 (17:36 -0500)
committerMatthew Wilcox <willy@infradead.org>
Thu, 21 Feb 2019 22:36:45 +0000 (17:36 -0500)
commit2fbe967b3eb7466f679307b38564b8271c093241
treed5e97862217a0a89e538f073c7b66483438c2cca
parent962033d55d0761e0716a01a715c6659c8c8dfc41
XArray: Fix xa_erase of 2-byte aligned entries

xas_store() was interpreting the entry it found in the array as a node
entry if the bottom two bits had value 2.  That's only true if either
the entry is in the root node or in a non-leaf node.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
lib/test_xarray.c
lib/xarray.c