diff options
Diffstat (limited to 'lib/xarray.c')
-rw-r--r-- | lib/xarray.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/lib/xarray.c b/lib/xarray.c index 5f3f9311de89..dda6026d202e 100644 --- a/lib/xarray.c +++ b/lib/xarray.c | |||
@@ -1251,35 +1251,6 @@ void *xas_find_conflict(struct xa_state *xas) | |||
1251 | EXPORT_SYMBOL_GPL(xas_find_conflict); | 1251 | EXPORT_SYMBOL_GPL(xas_find_conflict); |
1252 | 1252 | ||
1253 | /** | 1253 | /** |
1254 | * xa_init_flags() - Initialise an empty XArray with flags. | ||
1255 | * @xa: XArray. | ||
1256 | * @flags: XA_FLAG values. | ||
1257 | * | ||
1258 | * If you need to initialise an XArray with special flags (eg you need | ||
1259 | * to take the lock from interrupt context), use this function instead | ||
1260 | * of xa_init(). | ||
1261 | * | ||
1262 | * Context: Any context. | ||
1263 | */ | ||
1264 | void xa_init_flags(struct xarray *xa, gfp_t flags) | ||
1265 | { | ||
1266 | unsigned int lock_type; | ||
1267 | static struct lock_class_key xa_lock_irq; | ||
1268 | static struct lock_class_key xa_lock_bh; | ||
1269 | |||
1270 | spin_lock_init(&xa->xa_lock); | ||
1271 | xa->xa_flags = flags; | ||
1272 | xa->xa_head = NULL; | ||
1273 | |||
1274 | lock_type = xa_lock_type(xa); | ||
1275 | if (lock_type == XA_LOCK_IRQ) | ||
1276 | lockdep_set_class(&xa->xa_lock, &xa_lock_irq); | ||
1277 | else if (lock_type == XA_LOCK_BH) | ||
1278 | lockdep_set_class(&xa->xa_lock, &xa_lock_bh); | ||
1279 | } | ||
1280 | EXPORT_SYMBOL(xa_init_flags); | ||
1281 | |||
1282 | /** | ||
1283 | * xa_load() - Load an entry from an XArray. | 1254 | * xa_load() - Load an entry from an XArray. |
1284 | * @xa: XArray. | 1255 | * @xa: XArray. |
1285 | * @index: index into array. | 1256 | * @index: index into array. |