diff options
author | Jeff Mahoney <jeffm@suse.com> | 2006-06-26 00:27:19 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-09-08 20:23:01 -0700 |
commit | 722cc750d76f384c5b881a1dad7e1e12c5d7fb79 (patch) | |
tree | d8bb9c9e72baaa9aeb2a8273038e9092fa4aa0e1 /include | |
parent | 386986a5c2f0d5bd4a9b184f9093391a581bf601 (diff) |
[PATCH] lib: add idr_replace
This patch adds idr_replace() to replace an existing pointer in a single
operation.
Device-mapper will use this to update the pointer it stored against a given
id.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/idr.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/idr.h b/include/linux/idr.h index d37c8d808b0f..f559a719dbe8 100644 --- a/include/linux/idr.h +++ b/include/linux/idr.h @@ -78,6 +78,7 @@ void *idr_find(struct idr *idp, int id); int idr_pre_get(struct idr *idp, gfp_t gfp_mask); int idr_get_new(struct idr *idp, void *ptr, int *id); int idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id); +void *idr_replace(struct idr *idp, void *ptr, int id); void idr_remove(struct idr *idp, int id); void idr_destroy(struct idr *idp); void idr_init(struct idr *idp); |