XArray: Turn xa_init_flags into a static inline
authorMatthew Wilcox <willy@infradead.org>
Wed, 5 Dec 2018 21:37:03 +0000 (16:37 -0500)
committerMatthew Wilcox <willy@infradead.org>
Mon, 7 Jan 2019 02:24:43 +0000 (21:24 -0500)
commit02669b17a433c242a40f01f14b691c9c9d1f8a13
tree8795a3a5f799d8a6482929bce982da7818d8e3c4
parent490fd30f859572ac97a51faa31860869744ba97b
XArray: Turn xa_init_flags into a static inline

A regular xa_init_flags() put all dynamically-initialised XArrays into
the same locking class.  That leads to lockdep believing that taking
one XArray lock while holding another is a deadlock.  It's possible to
work around some of these situations with separate locking classes for
irq/bh/regular XArrays, and SINGLE_DEPTH_NESTING, but that's ugly, and
it doesn't work for all situations (where we have completely unrelated
XArrays).

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