diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-28 12:31:34 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-28 12:31:34 -0400 |
commit | 96b88fb850cc419171f926ad04650ec509e9f543 (patch) | |
tree | 5bf9537bde467534608b3acdbfa5f7726ede8c3f /lib | |
parent | e78a57de94480226f7fc90d0b4837bfc6c99a9e0 (diff) | |
parent | 5fadd053d9bb4345ec6f405d24db4e7eb49cf81e (diff) |
Merge branch 'master'
Diffstat (limited to 'lib')
-rw-r--r-- | lib/idr.c | 15 | ||||
-rw-r--r-- | lib/kobject.c | 2 | ||||
-rw-r--r-- | lib/kobject_uevent.c | 4 | ||||
-rw-r--r-- | lib/textsearch.c | 2 |
4 files changed, 18 insertions, 5 deletions
@@ -72,7 +72,7 @@ static void free_layer(struct idr *idp, struct idr_layer *p) | |||
72 | * If the system is REALLY out of memory this function returns 0, | 72 | * If the system is REALLY out of memory this function returns 0, |
73 | * otherwise 1. | 73 | * otherwise 1. |
74 | */ | 74 | */ |
75 | int idr_pre_get(struct idr *idp, unsigned gfp_mask) | 75 | int idr_pre_get(struct idr *idp, gfp_t gfp_mask) |
76 | { | 76 | { |
77 | while (idp->id_free_cnt < IDR_FREE_MAX) { | 77 | while (idp->id_free_cnt < IDR_FREE_MAX) { |
78 | struct idr_layer *new; | 78 | struct idr_layer *new; |
@@ -346,6 +346,19 @@ void idr_remove(struct idr *idp, int id) | |||
346 | EXPORT_SYMBOL(idr_remove); | 346 | EXPORT_SYMBOL(idr_remove); |
347 | 347 | ||
348 | /** | 348 | /** |
349 | * idr_destroy - release all cached layers within an idr tree | ||
350 | * idp: idr handle | ||
351 | */ | ||
352 | void idr_destroy(struct idr *idp) | ||
353 | { | ||
354 | while (idp->id_free_cnt) { | ||
355 | struct idr_layer *p = alloc_layer(idp); | ||
356 | kmem_cache_free(idr_layer_cache, p); | ||
357 | } | ||
358 | } | ||
359 | EXPORT_SYMBOL(idr_destroy); | ||
360 | |||
361 | /** | ||
349 | * idr_find - return pointer for given id | 362 | * idr_find - return pointer for given id |
350 | * @idp: idr handle | 363 | * @idp: idr handle |
351 | * @id: lookup key | 364 | * @id: lookup key |
diff --git a/lib/kobject.c b/lib/kobject.c index dd0917dd9fa9..253d3004ace9 100644 --- a/lib/kobject.c +++ b/lib/kobject.c | |||
@@ -100,7 +100,7 @@ static void fill_kobj_path(struct kobject *kobj, char *path, int length) | |||
100 | * @kobj: kobject in question, with which to build the path | 100 | * @kobj: kobject in question, with which to build the path |
101 | * @gfp_mask: the allocation type used to allocate the path | 101 | * @gfp_mask: the allocation type used to allocate the path |
102 | */ | 102 | */ |
103 | char *kobject_get_path(struct kobject *kobj, int gfp_mask) | 103 | char *kobject_get_path(struct kobject *kobj, gfp_t gfp_mask) |
104 | { | 104 | { |
105 | char *path; | 105 | char *path; |
106 | int len; | 106 | int len; |
diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c index 04ca4429ddfa..7ef6f6a17aa6 100644 --- a/lib/kobject_uevent.c +++ b/lib/kobject_uevent.c | |||
@@ -62,7 +62,7 @@ static struct sock *uevent_sock; | |||
62 | * @gfp_mask: | 62 | * @gfp_mask: |
63 | */ | 63 | */ |
64 | static int send_uevent(const char *signal, const char *obj, | 64 | static int send_uevent(const char *signal, const char *obj, |
65 | char **envp, int gfp_mask) | 65 | char **envp, gfp_t gfp_mask) |
66 | { | 66 | { |
67 | struct sk_buff *skb; | 67 | struct sk_buff *skb; |
68 | char *pos; | 68 | char *pos; |
@@ -98,7 +98,7 @@ static int send_uevent(const char *signal, const char *obj, | |||
98 | } | 98 | } |
99 | 99 | ||
100 | static int do_kobject_uevent(struct kobject *kobj, enum kobject_action action, | 100 | static int do_kobject_uevent(struct kobject *kobj, enum kobject_action action, |
101 | struct attribute *attr, int gfp_mask) | 101 | struct attribute *attr, gfp_t gfp_mask) |
102 | { | 102 | { |
103 | char *path; | 103 | char *path; |
104 | char *attrpath; | 104 | char *attrpath; |
diff --git a/lib/textsearch.c b/lib/textsearch.c index 1e934c196f0f..6f3093efbd7b 100644 --- a/lib/textsearch.c +++ b/lib/textsearch.c | |||
@@ -254,7 +254,7 @@ unsigned int textsearch_find_continuous(struct ts_config *conf, | |||
254 | * parameters or a ERR_PTR(). | 254 | * parameters or a ERR_PTR(). |
255 | */ | 255 | */ |
256 | struct ts_config *textsearch_prepare(const char *algo, const void *pattern, | 256 | struct ts_config *textsearch_prepare(const char *algo, const void *pattern, |
257 | unsigned int len, int gfp_mask, int flags) | 257 | unsigned int len, gfp_t gfp_mask, int flags) |
258 | { | 258 | { |
259 | int err = -ENOENT; | 259 | int err = -ENOENT; |
260 | struct ts_config *conf; | 260 | struct ts_config *conf; |