diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/bio.h | 4 | ||||
-rw-r--r-- | include/linux/bitmap.h | 1 | ||||
-rw-r--r-- | include/linux/bitops.h | 1 | ||||
-rw-r--r-- | include/linux/kernel.h | 3 | ||||
-rw-r--r-- | include/linux/rcupdate.h | 1 | ||||
-rw-r--r-- | include/linux/slab.h | 5 |
6 files changed, 11 insertions, 4 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h index 1f8acca2..b3755406 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -235,6 +235,7 @@ enum { struct bio *bio_alloc_bioset(struct block_device *, unsigned, blk_opf_t, gfp_t, struct bio_set *); + extern void bio_put(struct bio *); int bio_add_page(struct bio *, struct page *, unsigned, unsigned); @@ -242,6 +243,9 @@ int bio_add_page(struct bio *, struct page *, unsigned, unsigned); struct bio *bio_alloc_clone(struct block_device *, struct bio *, gfp_t, struct bio_set *); +struct bio *bio_alloc(struct block_device *, unsigned, + blk_opf_t, gfp_t); + struct bio *bio_kmalloc(unsigned int, gfp_t); extern void bio_endio(struct bio *); diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h index db2dfdb2..5192c3e1 100644 --- a/include/linux/bitmap.h +++ b/include/linux/bitmap.h @@ -3,6 +3,7 @@ #include <string.h> #include <linux/bitops.h> +#include <linux/kernel.h> #include <stdlib.h> #define DECLARE_BITMAP(name,bits) \ diff --git a/include/linux/bitops.h b/include/linux/bitops.h index 758476b1..93739532 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h @@ -2,7 +2,6 @@ #define _TOOLS_LINUX_BITOPS_H_ #include <asm/types.h> -#include <linux/kernel.h> #include <linux/compiler.h> #include <linux/page.h> diff --git a/include/linux/kernel.h b/include/linux/kernel.h index ef0b1a7d..8f1cbc2d 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -111,9 +111,6 @@ #define struct_group(NAME, MEMBERS...) \ __struct_group(/* no tag */, NAME, /* no attrs */, MEMBERS) -#define swap(a, b) \ - do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0) - /* This counts to 12. Any more, it will return 13th argument. */ #define __COUNT_ARGS(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _n, X...) _n #define COUNT_ARGS(X...) __COUNT_ARGS(, ##X, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0) diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index f5260270..6b7785e6 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h @@ -13,6 +13,7 @@ #define kfree_rcu(ptr, rcu_head) kfree(ptr) /* XXX */ #define kfree_rcu_mightsleep(ptr) kfree(ptr) /* XXX */ +#define kvfree_rcu(ptr, rcu_head) kfree(ptr) /* XXX */ #define kvfree_rcu_mightsleep(ptr) kfree(ptr) /* XXX */ #define RCU_INIT_POINTER(p, v) WRITE_ONCE(p, v) diff --git a/include/linux/slab.h b/include/linux/slab.h index ca0c7934..35f7b1ba 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h @@ -20,6 +20,11 @@ #define ARCH_KMALLOC_MINALIGN 16 #define KMALLOC_MAX_SIZE SIZE_MAX +static inline size_t kmalloc_size_roundup(size_t s) +{ + return roundup_pow_of_two(s); +} + static inline void *kmalloc_noprof(size_t size, gfp_t flags) { unsigned i; |