]> git.baikalelectronics.ru Git - kernel.git/commit
XArray: Fix xa_find_after with multi-index entries
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Sat, 18 Jan 2020 03:00:41 +0000 (22:00 -0500)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Sat, 18 Jan 2020 03:33:27 +0000 (22:33 -0500)
commit211ba61453b649cfbb28c7cc65758b1798a4a39d
tree6080ded903efebfd2c32c21b3dccb2ab96075f4a
parent8e77e93307213b65e325939ceee8109ef18c7856
XArray: Fix xa_find_after with multi-index entries

If the entry is of an order which is a multiple of XA_CHUNK_SIZE,
the current detection of sibling entries does not work.  Factor out
an xas_sibling() function to make xa_find_after() a little more
understandable, and write a new implementation that doesn't suffer from
the same bug.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: stable@vger.kernel.org
lib/test_xarray.c
lib/xarray.c