xref: /linux/rust/helpers/xarray.c (revision ec7714e4947909190ffb3041a03311a975350fe0)
1*210b8157STamir Duberstein // SPDX-License-Identifier: GPL-2.0
2*210b8157STamir Duberstein 
3*210b8157STamir Duberstein #include <linux/xarray.h>
4*210b8157STamir Duberstein 
rust_helper_xa_err(void * entry)5*210b8157STamir Duberstein int rust_helper_xa_err(void *entry)
6*210b8157STamir Duberstein {
7*210b8157STamir Duberstein 	return xa_err(entry);
8*210b8157STamir Duberstein }
9*210b8157STamir Duberstein 
rust_helper_xa_init_flags(struct xarray * xa,gfp_t flags)10*210b8157STamir Duberstein void rust_helper_xa_init_flags(struct xarray *xa, gfp_t flags)
11*210b8157STamir Duberstein {
12*210b8157STamir Duberstein 	return xa_init_flags(xa, flags);
13*210b8157STamir Duberstein }
14*210b8157STamir Duberstein 
rust_helper_xa_trylock(struct xarray * xa)15*210b8157STamir Duberstein int rust_helper_xa_trylock(struct xarray *xa)
16*210b8157STamir Duberstein {
17*210b8157STamir Duberstein 	return xa_trylock(xa);
18*210b8157STamir Duberstein }
19*210b8157STamir Duberstein 
rust_helper_xa_lock(struct xarray * xa)20*210b8157STamir Duberstein void rust_helper_xa_lock(struct xarray *xa)
21*210b8157STamir Duberstein {
22*210b8157STamir Duberstein 	return xa_lock(xa);
23*210b8157STamir Duberstein }
24*210b8157STamir Duberstein 
rust_helper_xa_unlock(struct xarray * xa)25*210b8157STamir Duberstein void rust_helper_xa_unlock(struct xarray *xa)
26*210b8157STamir Duberstein {
27*210b8157STamir Duberstein 	return xa_unlock(xa);
28*210b8157STamir Duberstein }
29