summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-02-28 02:05:07 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-28 04:10:20 +0100
commit54616283c2948812a44240858ced610e7cacbde1 (patch)
tree268bbe9049d9370d5b644dfde51fc4a8942bae3b /include
parentidr: make idr_layer larger (diff)
downloadlinux-54616283c2948812a44240858ced610e7cacbde1.tar.xz
linux-54616283c2948812a44240858ced610e7cacbde1.zip
idr: add idr_layer->prefix
Add a field which carries the prefix of ID the idr_layer covers. This will be used to implement lookup hint. This patch doesn't make use of the new field and doesn't introduce any behavior difference. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/idr.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/idr.h b/include/linux/idr.h
index 43b87b1c77a3..7b1c5c6f9a06 100644
--- a/include/linux/idr.h
+++ b/include/linux/idr.h
@@ -28,6 +28,7 @@
#define IDR_MASK ((1 << IDR_BITS)-1)
struct idr_layer {
+ int prefix; /* the ID prefix of this idr_layer */
DECLARE_BITMAP(bitmap, IDR_SIZE); /* A zero bit means "space here" */
struct idr_layer __rcu *ary[1<<IDR_BITS];
int count; /* When zero, we can release it */