diff options
Diffstat (limited to 'include/linux/xarray.h')
-rw-r--r-- | include/linux/xarray.h | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/include/linux/xarray.h b/include/linux/xarray.h index 588733abd19d..0e01e6129145 100644 --- a/include/linux/xarray.h +++ b/include/linux/xarray.h | |||
@@ -525,7 +525,6 @@ int __must_check __xa_alloc(struct xarray *, u32 *id, void *entry, | |||
525 | struct xa_limit, gfp_t); | 525 | struct xa_limit, gfp_t); |
526 | int __must_check __xa_alloc_cyclic(struct xarray *, u32 *id, void *entry, | 526 | int __must_check __xa_alloc_cyclic(struct xarray *, u32 *id, void *entry, |
527 | struct xa_limit, u32 *next, gfp_t); | 527 | struct xa_limit, u32 *next, gfp_t); |
528 | int __must_check __xa_reserve(struct xarray *, unsigned long index, gfp_t); | ||
529 | void __xa_set_mark(struct xarray *, unsigned long index, xa_mark_t); | 528 | void __xa_set_mark(struct xarray *, unsigned long index, xa_mark_t); |
530 | void __xa_clear_mark(struct xarray *, unsigned long index, xa_mark_t); | 529 | void __xa_clear_mark(struct xarray *, unsigned long index, xa_mark_t); |
531 | 530 | ||
@@ -1004,13 +1003,7 @@ static inline int xa_alloc_cyclic_irq(struct xarray *xa, u32 *id, void *entry, | |||
1004 | static inline __must_check | 1003 | static inline __must_check |
1005 | int xa_reserve(struct xarray *xa, unsigned long index, gfp_t gfp) | 1004 | int xa_reserve(struct xarray *xa, unsigned long index, gfp_t gfp) |
1006 | { | 1005 | { |
1007 | int ret; | 1006 | return xa_err(xa_cmpxchg(xa, index, NULL, XA_ZERO_ENTRY, gfp)); |
1008 | |||
1009 | xa_lock(xa); | ||
1010 | ret = __xa_reserve(xa, index, gfp); | ||
1011 | xa_unlock(xa); | ||
1012 | |||
1013 | return ret; | ||
1014 | } | 1007 | } |
1015 | 1008 | ||
1016 | /** | 1009 | /** |
@@ -1028,13 +1021,7 @@ int xa_reserve(struct xarray *xa, unsigned long index, gfp_t gfp) | |||
1028 | static inline __must_check | 1021 | static inline __must_check |
1029 | int xa_reserve_bh(struct xarray *xa, unsigned long index, gfp_t gfp) | 1022 | int xa_reserve_bh(struct xarray *xa, unsigned long index, gfp_t gfp) |
1030 | { | 1023 | { |
1031 | int ret; | 1024 | return xa_err(xa_cmpxchg_bh(xa, index, NULL, XA_ZERO_ENTRY, gfp)); |
1032 | |||
1033 | xa_lock_bh(xa); | ||
1034 | ret = __xa_reserve(xa, index, gfp); | ||
1035 | xa_unlock_bh(xa); | ||
1036 | |||
1037 | return ret; | ||
1038 | } | 1025 | } |
1039 | 1026 | ||
1040 | /** | 1027 | /** |
@@ -1052,13 +1039,7 @@ int xa_reserve_bh(struct xarray *xa, unsigned long index, gfp_t gfp) | |||
1052 | static inline __must_check | 1039 | static inline __must_check |
1053 | int xa_reserve_irq(struct xarray *xa, unsigned long index, gfp_t gfp) | 1040 | int xa_reserve_irq(struct xarray *xa, unsigned long index, gfp_t gfp) |
1054 | { | 1041 | { |
1055 | int ret; | 1042 | return xa_err(xa_cmpxchg_irq(xa, index, NULL, XA_ZERO_ENTRY, gfp)); |
1056 | |||
1057 | xa_lock_irq(xa); | ||
1058 | ret = __xa_reserve(xa, index, gfp); | ||
1059 | xa_unlock_irq(xa); | ||
1060 | |||
1061 | return ret; | ||
1062 | } | 1043 | } |
1063 | 1044 | ||
1064 | /** | 1045 | /** |