XArray: Honour reserved entries in xa_insert
authorMatthew Wilcox <willy@infradead.org>
Wed, 2 Jan 2019 18:57:03 +0000 (13:57 -0500)
committerMatthew Wilcox <willy@infradead.org>
Mon, 7 Jan 2019 03:12:58 +0000 (22:12 -0500)
commitb0606fed6eece16a421034eca0bbea9a08b90e91
treef705b58760a60fce2d6f03a934a5038154505c1b
parent76b4e52995654af260f14558e0e07b5b039ae202
XArray: Honour reserved entries in xa_insert

xa_insert() should treat reserved entries as occupied, not as available.
Also, it should treat requests to insert a NULL pointer as a request
to reserve the slot.  Add xa_insert_bh() and xa_insert_irq() for
completeness.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
Documentation/core-api/xarray.rst
include/linux/xarray.h
lib/test_xarray.c
lib/xarray.c