diff options
| author | Ingo Molnar <mingo@kernel.org> | 2022-09-21 09:58:02 +0200 | 
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2022-09-21 09:58:02 +0200 | 
| commit | 74656d03ac36fabb16b9df5221cf398ee3a9ca08 (patch) | |
| tree | 0600e619ac817e2c016c148810814f55280316cc /include/linux/xarray.h | |
| parent | 0d97db026509c1a13f732b22670ab1f0ac9d8d87 (diff) | |
| parent | 521a547ced6477c54b4b0cc206000406c221b4d6 (diff) | |
Merge tag 'v6.0-rc6' into locking/core, to refresh the branch
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/xarray.h')
| -rw-r--r-- | include/linux/xarray.h | 15 | 
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/xarray.h b/include/linux/xarray.h index c29e11b2c073..44dd6d6e01bc 100644 --- a/include/linux/xarray.h +++ b/include/linux/xarray.h @@ -16,6 +16,7 @@  #include <linux/kconfig.h>  #include <linux/kernel.h>  #include <linux/rcupdate.h> +#include <linux/sched/mm.h>  #include <linux/spinlock.h>  #include <linux/types.h> @@ -586,6 +587,7 @@ static inline void *xa_store_bh(struct xarray *xa, unsigned long index,  {  	void *curr; +	might_alloc(gfp);  	xa_lock_bh(xa);  	curr = __xa_store(xa, index, entry, gfp);  	xa_unlock_bh(xa); @@ -612,6 +614,7 @@ static inline void *xa_store_irq(struct xarray *xa, unsigned long index,  {  	void *curr; +	might_alloc(gfp);  	xa_lock_irq(xa);  	curr = __xa_store(xa, index, entry, gfp);  	xa_unlock_irq(xa); @@ -687,6 +690,7 @@ static inline void *xa_cmpxchg(struct xarray *xa, unsigned long index,  {  	void *curr; +	might_alloc(gfp);  	xa_lock(xa);  	curr = __xa_cmpxchg(xa, index, old, entry, gfp);  	xa_unlock(xa); @@ -714,6 +718,7 @@ static inline void *xa_cmpxchg_bh(struct xarray *xa, unsigned long index,  {  	void *curr; +	might_alloc(gfp);  	xa_lock_bh(xa);  	curr = __xa_cmpxchg(xa, index, old, entry, gfp);  	xa_unlock_bh(xa); @@ -741,6 +746,7 @@ static inline void *xa_cmpxchg_irq(struct xarray *xa, unsigned long index,  {  	void *curr; +	might_alloc(gfp);  	xa_lock_irq(xa);  	curr = __xa_cmpxchg(xa, index, old, entry, gfp);  	xa_unlock_irq(xa); @@ -770,6 +776,7 @@ static inline int __must_check xa_insert(struct xarray *xa,  {  	int err; +	might_alloc(gfp);  	xa_lock(xa);  	err = __xa_insert(xa, index, entry, gfp);  	xa_unlock(xa); @@ -799,6 +806,7 @@ static inline int __must_check xa_insert_bh(struct xarray *xa,  {  	int err; +	might_alloc(gfp);  	xa_lock_bh(xa);  	err = __xa_insert(xa, index, entry, gfp);  	xa_unlock_bh(xa); @@ -828,6 +836,7 @@ static inline int __must_check xa_insert_irq(struct xarray *xa,  {  	int err; +	might_alloc(gfp);  	xa_lock_irq(xa);  	err = __xa_insert(xa, index, entry, gfp);  	xa_unlock_irq(xa); @@ -857,6 +866,7 @@ static inline __must_check int xa_alloc(struct xarray *xa, u32 *id,  {  	int err; +	might_alloc(gfp);  	xa_lock(xa);  	err = __xa_alloc(xa, id, entry, limit, gfp);  	xa_unlock(xa); @@ -886,6 +896,7 @@ static inline int __must_check xa_alloc_bh(struct xarray *xa, u32 *id,  {  	int err; +	might_alloc(gfp);  	xa_lock_bh(xa);  	err = __xa_alloc(xa, id, entry, limit, gfp);  	xa_unlock_bh(xa); @@ -915,6 +926,7 @@ static inline int __must_check xa_alloc_irq(struct xarray *xa, u32 *id,  {  	int err; +	might_alloc(gfp);  	xa_lock_irq(xa);  	err = __xa_alloc(xa, id, entry, limit, gfp);  	xa_unlock_irq(xa); @@ -948,6 +960,7 @@ static inline int xa_alloc_cyclic(struct xarray *xa, u32 *id, void *entry,  {  	int err; +	might_alloc(gfp);  	xa_lock(xa);  	err = __xa_alloc_cyclic(xa, id, entry, limit, next, gfp);  	xa_unlock(xa); @@ -981,6 +994,7 @@ static inline int xa_alloc_cyclic_bh(struct xarray *xa, u32 *id, void *entry,  {  	int err; +	might_alloc(gfp);  	xa_lock_bh(xa);  	err = __xa_alloc_cyclic(xa, id, entry, limit, next, gfp);  	xa_unlock_bh(xa); @@ -1014,6 +1028,7 @@ static inline int xa_alloc_cyclic_irq(struct xarray *xa, u32 *id, void *entry,  {  	int err; +	might_alloc(gfp);  	xa_lock_irq(xa);  	err = __xa_alloc_cyclic(xa, id, entry, limit, next, gfp);  	xa_unlock_irq(xa);  | 
