diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-03-13 18:21:57 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-03-13 18:21:57 -0400 |
| commit | 842d223f28c4a4a6fe34df2d613049d4e47446c1 (patch) | |
| tree | fe24924112a915651eb8cc2c03836a695db6b7d7 /include/linux | |
| parent | ad8395e149e86ca3a76b6ae300c0d0a92b7f7e17 (diff) | |
| parent | 59bfbcf01967d4d3370a2b8294673dd709e732cc (diff) | |
Merge branch 'akpm' (fixes from Andrew)
Merge misc fixes from Andrew Morton:
- A bunch of fixes
- Finish off the idr API conversions before someone starts to use the
old interfaces again.
* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
idr: idr_alloc() shouldn't trigger lowmem warning when preloaded
UAPI: fix endianness conditionals in M32R's asm/stat.h
UAPI: fix endianness conditionals in linux/raid/md_p.h
UAPI: fix endianness conditionals in linux/acct.h
UAPI: fix endianness conditionals in linux/aio_abi.h
decompressors: fix typo "POWERPC"
mm/fremap.c: fix oops on error path
idr: deprecate idr_pre_get() and idr_get_new[_above]()
tidspbridge: convert to idr_alloc()
zcache: convert to idr_alloc()
mlx4: remove leftover idr_pre_get() call
workqueue: convert to idr_alloc()
nfsd: convert to idr_alloc()
nfsd: remove unused get_new_stid()
kernel/signal.c: use __ARCH_HAS_SA_RESTORER instead of SA_RESTORER
signal: always clear sa_restorer on execve
mm: remove_memory(): fix end_pfn setting
include/linux/res_counter.h needs errno.h
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/idr.h | 66 | ||||
| -rw-r--r-- | include/linux/res_counter.h | 1 |
2 files changed, 51 insertions, 16 deletions
diff --git a/include/linux/idr.h b/include/linux/idr.h index 8c1f81f823c8..2640c7e99e51 100644 --- a/include/linux/idr.h +++ b/include/linux/idr.h | |||
| @@ -73,8 +73,6 @@ struct idr { | |||
| 73 | */ | 73 | */ |
| 74 | 74 | ||
| 75 | void *idr_find_slowpath(struct idr *idp, int id); | 75 | void *idr_find_slowpath(struct idr *idp, int id); |
| 76 | int idr_pre_get(struct idr *idp, gfp_t gfp_mask); | ||
| 77 | int idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id); | ||
| 78 | void idr_preload(gfp_t gfp_mask); | 76 | void idr_preload(gfp_t gfp_mask); |
| 79 | int idr_alloc(struct idr *idp, void *ptr, int start, int end, gfp_t gfp_mask); | 77 | int idr_alloc(struct idr *idp, void *ptr, int start, int end, gfp_t gfp_mask); |
| 80 | int idr_for_each(struct idr *idp, | 78 | int idr_for_each(struct idr *idp, |
| @@ -120,19 +118,6 @@ static inline void *idr_find(struct idr *idr, int id) | |||
| 120 | } | 118 | } |
| 121 | 119 | ||
| 122 | /** | 120 | /** |
| 123 | * idr_get_new - allocate new idr entry | ||
| 124 | * @idp: idr handle | ||
| 125 | * @ptr: pointer you want associated with the id | ||
| 126 | * @id: pointer to the allocated handle | ||
| 127 | * | ||
| 128 | * Simple wrapper around idr_get_new_above() w/ @starting_id of zero. | ||
| 129 | */ | ||
| 130 | static inline int idr_get_new(struct idr *idp, void *ptr, int *id) | ||
| 131 | { | ||
| 132 | return idr_get_new_above(idp, ptr, 0, id); | ||
| 133 | } | ||
| 134 | |||
| 135 | /** | ||
| 136 | * idr_for_each_entry - iterate over an idr's elements of a given type | 121 | * idr_for_each_entry - iterate over an idr's elements of a given type |
| 137 | * @idp: idr handle | 122 | * @idp: idr handle |
| 138 | * @entry: the type * to use as cursor | 123 | * @entry: the type * to use as cursor |
| @@ -143,7 +128,56 @@ static inline int idr_get_new(struct idr *idp, void *ptr, int *id) | |||
| 143 | entry != NULL; \ | 128 | entry != NULL; \ |
| 144 | ++id, entry = (typeof(entry))idr_get_next((idp), &(id))) | 129 | ++id, entry = (typeof(entry))idr_get_next((idp), &(id))) |
| 145 | 130 | ||
| 146 | void __idr_remove_all(struct idr *idp); /* don't use */ | 131 | /* |
| 132 | * Don't use the following functions. These exist only to suppress | ||
| 133 | * deprecated warnings on EXPORT_SYMBOL()s. | ||
| 134 | */ | ||
| 135 | int __idr_pre_get(struct idr *idp, gfp_t gfp_mask); | ||
| 136 | int __idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id); | ||
| 137 | void __idr_remove_all(struct idr *idp); | ||
| 138 | |||
| 139 | /** | ||
| 140 | * idr_pre_get - reserve resources for idr allocation | ||
| 141 | * @idp: idr handle | ||
| 142 | * @gfp_mask: memory allocation flags | ||
| 143 | * | ||
| 144 | * Part of old alloc interface. This is going away. Use | ||
| 145 | * idr_preload[_end]() and idr_alloc() instead. | ||
| 146 | */ | ||
| 147 | static inline int __deprecated idr_pre_get(struct idr *idp, gfp_t gfp_mask) | ||
| 148 | { | ||
| 149 | return __idr_pre_get(idp, gfp_mask); | ||
| 150 | } | ||
| 151 | |||
| 152 | /** | ||
| 153 | * idr_get_new_above - allocate new idr entry above or equal to a start id | ||
| 154 | * @idp: idr handle | ||
| 155 | * @ptr: pointer you want associated with the id | ||
| 156 | * @starting_id: id to start search at | ||
| 157 | * @id: pointer to the allocated handle | ||
| 158 | * | ||
| 159 | * Part of old alloc interface. This is going away. Use | ||
| 160 | * idr_preload[_end]() and idr_alloc() instead. | ||
| 161 | */ | ||
| 162 | static inline int __deprecated idr_get_new_above(struct idr *idp, void *ptr, | ||
| 163 | int starting_id, int *id) | ||
| 164 | { | ||
| 165 | return __idr_get_new_above(idp, ptr, starting_id, id); | ||
| 166 | } | ||
| 167 | |||
| 168 | /** | ||
| 169 | * idr_get_new - allocate new idr entry | ||
| 170 | * @idp: idr handle | ||
| 171 | * @ptr: pointer you want associated with the id | ||
| 172 | * @id: pointer to the allocated handle | ||
| 173 | * | ||
| 174 | * Part of old alloc interface. This is going away. Use | ||
| 175 | * idr_preload[_end]() and idr_alloc() instead. | ||
| 176 | */ | ||
| 177 | static inline int __deprecated idr_get_new(struct idr *idp, void *ptr, int *id) | ||
| 178 | { | ||
| 179 | return __idr_get_new_above(idp, ptr, 0, id); | ||
| 180 | } | ||
| 147 | 181 | ||
| 148 | /** | 182 | /** |
| 149 | * idr_remove_all - remove all ids from the given idr tree | 183 | * idr_remove_all - remove all ids from the given idr tree |
diff --git a/include/linux/res_counter.h b/include/linux/res_counter.h index 5ae8456d9670..c23099413ad6 100644 --- a/include/linux/res_counter.h +++ b/include/linux/res_counter.h | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | */ | 14 | */ |
| 15 | 15 | ||
| 16 | #include <linux/cgroup.h> | 16 | #include <linux/cgroup.h> |
| 17 | #include <linux/errno.h> | ||
| 17 | 18 | ||
| 18 | /* | 19 | /* |
| 19 | * The core object. the cgroup that wishes to account for some | 20 | * The core object. the cgroup that wishes to account for some |
